refactor: reorganize project in order to include automation #1
1 changed files with 16 additions and 18 deletions
|
@ -2,35 +2,33 @@ name: Build and test project
|
|||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
branches: [master]
|
||||
pull-request:
|
||||
branches:
|
||||
- master
|
||||
branches: [master]
|
||||
|
||||
jobs:
|
||||
|
||||
build:
|
||||
|
||||
runs-on: debian-12
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [ '1.22' ]
|
||||
|
||||
steps:
|
||||
|
||||
- name: Checkout repo
|
||||
-
|
||||
name: Checkout repo
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Go
|
||||
-
|
||||
name: Extract Go version
|
||||
id: go-version
|
||||
run: |
|
||||
sed '/^go /!d; s/go /version=/' go.mod >>"$GITHUB_OUTPUT"
|
||||
-
|
||||
name: Setup Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: ${{ matrix.go-version }}
|
||||
|
||||
- name: Build for host architecture
|
||||
go-version: ${{ steps.go-version.outputs.version }}
|
||||
-
|
||||
name: Build for host architecture
|
||||
run: |
|
||||
make build
|
||||
|
||||
- name: Run tests
|
||||
-
|
||||
name: Run tests
|
||||
run: |
|
||||
make test
|
||||
|
|
Loading…
Reference in a new issue