build(deps): bump actions/checkout from 3 to 4 #19
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: Go | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Set up Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: ^1 | |
- name: Install tools | |
run: brew install mkcert staticcheck | |
- name: Vet | |
run: go vet ./... | |
- name: Staticcheck | |
run: staticcheck ./... | |
- name: Test | |
run: go test -v -race ./... | |
- name: Test without cgo | |
env: | |
CGO_ENABLED: 0 | |
run: go test -v ./... | |
- name: Verify repo is unchanged | |
run: git diff --exit-code HEAD -w -G'(^[^# /])|(^#\w)|(^\s+[^#/])' # Ignore whitespace and comments |