setup build #1
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: lint (go) | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
permissions: | |
contents: read | |
jobs: | |
lint: | |
name: lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/setup-go@v4 | |
with: | |
go-version: '1.22' | |
cache: false | |
- uses: actions/checkout@v3 | |
- name: Tidy | |
uses: katexochen/go-tidy-check@v2 | |
- name: Run govulncheck (when this fails => upgrade go version) | |
run: | | |
GOPATH_BIN=$(go env GOPATH)/bin | |
export PATH="${GOPATH_BIN}:${PATH}" | |
go install golang.org/x/vuln/cmd/govulncheck@latest | |
govulncheck ./... | |
- name: Check optimal struct field alignment (for crucial structs) | |
run: | | |
GOPATH_BIN=$(go env GOPATH)/bin | |
export PATH="${GOPATH_BIN}:${PATH}" | |
go install github.com/dkorunic/betteralign/cmd/betteralign@latest | |
betteralign ./internal/ogc/features/domain | |
- name: Golangci-lint | |
uses: golangci/golangci-lint-action@v3 | |
with: | |
version: latest |