| 1 |
name: Test |
| 2 |
|
| 3 |
on: |
| 4 |
push: |
| 5 |
branches: [ master ] |
| 6 |
pull_request: |
| 7 |
branches: [ master ] |
| 8 |
|
| 9 |
jobs: |
| 10 |
build: |
| 11 |
name: Build |
| 12 |
runs-on: ubuntu-latest |
| 13 |
strategy: |
| 14 |
matrix: |
| 15 |
go-version: [1.21.x, 1.22.x] |
| 16 |
steps: |
| 17 |
|
| 18 |
- name: Set up Go |
| 19 |
uses: actions/setup-go@v4 |
| 20 |
with: |
| 21 |
go-version: ${{ matrix.go-version }} |
| 22 |
id: go |
| 23 |
|
| 24 |
- name: Check out code into the Go module directory |
| 25 |
uses: actions/checkout@v2 |
| 26 |
|
| 27 |
- name: Get dependencies |
| 28 |
run: | |
| 29 |
go get -v -d ./... |
| 30 |
|
| 31 |
- name: Build |
| 32 |
run: go build -v . |
| 33 |
|
| 34 |
- name: Test |
| 35 |
run: go test -v . |