chore(deps): update actions/checkout digest to b4ffde6 #231
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Tests | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
go: [ '1.20', '1.x' ] | |
name: Tests | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ matrix.go }} | |
check-latest: true | |
- name: Get dependencies | |
run: go get -v -t -d ./... | |
- name: Test | |
run: CGO_ENABLED=1 go test -race ./... | |
static-checks: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
go: [ '1.x' ] | |
name: Static checks | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ matrix.go }} | |
check-latest: true | |
- name: Get dependencies | |
run: go get -v -t -d ./... | |
- name: Go Vet | |
run: go vet ./... | |
- name: Go Fmt | |
run: | | |
fmt=$(gofmt -l .) | |
test -z $fmt || (echo "please run gofmt" ; echo $fmt ; exit 1) | |
- name: Goimports | |
run: | | |
go run golang.org/x/tools/cmd/goimports@latest -w . | |
git diff --quiet || (echo 'goimports requires code cleanup:' ; git diff ; exit 1) | |
- name: Go Generate | |
run: | | |
go generate ./... | |
git diff --quiet || (echo 'generated go files are not up-to-date, check go generate, go.sum and go.mod:' ; git diff ; exit 1) |