Skip to content

Workflow file for this run

name: linting
on:
pull_request:
push:
branches: [main]
jobs:
ci:
name: "run linting"
strategy:
fail-fast: true
matrix:
os: ["ubuntu-latest"]
go: ["1.23.x"]
runs-on: ${{ matrix.os }}
steps:
- name: "checkout"
uses: actions/checkout@v4
- name: "fetch unshallow"
run: git fetch --prune --unshallow
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
run: |
"go install golang.org/x/tools/cmd/goimports@latest"
"go install honnef.co/go/tools/cmd/staticcheck@latest"
- name: "fmt"
run: if [ "$(go fmt ./... | wc -l)" -gt 0 ]; then echo "go fmt failed, please run again locally"; exit 1; fi
- name: "imports"
run: |
- name: "vet"
run: "go vet ./..."
- name: staticcheck
run: "staticcheck ./..."