1
0
Fork 0
mirror of https://github.com/sourcegraph/jsonrpc2.git synced 2026-06-16 04:04:56 +02:00
jsonrpc2/.github/workflows/ci.yml
Sam Herrmann 78a3d790f3
Pin staticcheck version to v0.2.2 (#63)
The CI pipeline has been broken in this project for some time because
the latest version of staticcheck is not compatible with every version
of Go. Through trial and error, it was discovered that staticcheck
v0.2.2 is the latest version that is compatible with Go 1.16.

The authors of staticcheck also recommend pinning the version in CI
pipelines to prevent unintentional breakage of the build [1].

References
[1]: https://staticcheck.io/docs/running-staticcheck/ci/github-actions/#version
2023-02-03 10:51:22 +02:00

30 lines
671 B
YAML

name: CI
on:
pull_request: {}
push:
branches:
- master
jobs:
test:
strategy:
fail-fast: false
matrix:
go:
- 1.16
name: Go ${{ matrix.go }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}
id: go
- name: Get dependencies
run: go get -t -v ./...
- name: Install staticcheck
run: go install honnef.co/go/tools/cmd/staticcheck@v0.2.2
- name: Lint
run: staticcheck -checks=all ./...
- name: Test
run: go test -v -race ./...