...
1on: [push, pull_request]
2name: build
3jobs:
4 test:
5 strategy:
6 matrix:
7 go-version: [1.18.x, 1.19.x, 1.20.x, 1.21.x]
8 os: [ubuntu-latest, macos-latest, windows-latest]
9 runs-on: ${{ matrix.os }}
10 steps:
11 - name: Install Go
12 uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491
13 with:
14 go-version: ${{ matrix.go-version }}
15 - name: Checkout code
16 uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
17 - name: Format Unix
18 if: runner.os == 'Linux'
19 run: test -z $(go fmt ./...)
20 - name: Test
21 run: go test -v ./...
22 staticcheck:
23 name: "Run staticcheck"
24 runs-on: ubuntu-latest
25 steps:
26 - name: Checkout code
27 uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
28 - uses: dominikh/staticcheck-action@ba605356b4b29a60e87ab9404b712f3461e566dc
29 with:
30 version: "2022.1"
View as plain text