ci: run go vet and staticcheck separately #40
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: PR | |
on: | |
pull_request: | |
types: [opened, reopened, synchronize] | |
jobs: | |
lint: | |
name: golangci-lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
- name: set up go | |
uses: WillAbides/setup-go-faster@v1 | |
with: | |
go-version-file: go.mod | |
- name: lint | |
uses: golangci/golangci-lint-action@v6 | |
with: | |
version: latest | |
check: | |
name: go vet and staticcheck | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
- name: set up go | |
uses: WillAbides/setup-go-faster@v1 | |
with: | |
go-version-file: go.mod | |
- name: run go vet | |
run: go vet ./... | |
- name: run staticcheck | |
uses: dominikh/staticcheck-action@v1 | |
with: | |
version: latest | |
tests: | |
name: unit tests with race detector enabled | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
- name: set up go | |
uses: WillAbides/setup-go-faster@v1 | |
with: | |
go-version-file: go.mod | |
- name: run unit tests | |
run: go test -v -race ./... |