...
1on: push
2name: Test
3jobs:
4 test:
5 strategy:
6 matrix:
7 go-version: [1.16.x]
8 platform: [ubuntu-latest, macos-latest, windows-latest]
9 runs-on: ${{ matrix.platform }}
10 steps:
11 - name: Install Go
12 uses: actions/setup-go@v1
13 with:
14 go-version: ${{ matrix.go-version }}
15 - name: Install staticcheck
16 run: go install honnef.co/go/tools/cmd/staticcheck@latest
17 shell: bash
18 - name: Install golint
19 run: go install golang.org/x/lint/golint@latest
20 shell: bash
21 - name: Update PATH
22 run: echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
23 shell: bash
24 - name: Checkout code
25 uses: actions/checkout@v1
26 - name: Fmt
27 if: matrix.platform != 'windows-latest' # :(
28 run: "diff <(gofmt -d .) <(printf '')"
29 shell: bash
30 - name: Vet
31 run: go vet ./...
32 - name: Staticcheck
33 run: staticcheck ./...
34 - name: Lint
35 run: golint ./...
36 - name: Test
37 run: go test -race ./...
View as plain text