[#482] Enable staticcheck in foregjo actions
All checks were successful
Tests and linters / Tests (1.19) (pull_request) Successful in 3m28s
Tests and linters / Lint (pull_request) Successful in 4m16s
ci/woodpecker/pr/pre-commit Pipeline was successful
Build / Build Components (1.19) (pull_request) Successful in 4m1s
Tests and linters / Staticcheck (pull_request) Successful in 5m25s
Build / Build Components (1.20) (pull_request) Successful in 2m23s
Tests and linters / Tests (1.20) (pull_request) Successful in 15m48s
Tests and linters / Tests with -race (pull_request) Successful in 22m25s
ci/woodpecker/push/pre-commit Pipeline was successful
All checks were successful
Tests and linters / Tests (1.19) (pull_request) Successful in 3m28s
Tests and linters / Lint (pull_request) Successful in 4m16s
ci/woodpecker/pr/pre-commit Pipeline was successful
Build / Build Components (1.19) (pull_request) Successful in 4m1s
Tests and linters / Staticcheck (pull_request) Successful in 5m25s
Build / Build Components (1.20) (pull_request) Successful in 2m23s
Tests and linters / Tests (1.20) (pull_request) Successful in 15m48s
Tests and linters / Tests with -race (pull_request) Successful in 22m25s
ci/woodpecker/push/pre-commit Pipeline was successful
Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
This commit is contained in:
parent
033eaf77e1
commit
a0d51090a4
2 changed files with 23 additions and 1 deletions
|
@ -52,3 +52,21 @@ jobs:
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: go test ./... -count=1 -race
|
run: go test ./... -count=1 -race
|
||||||
|
|
||||||
|
staticcheck:
|
||||||
|
name: Staticcheck
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Set up Go
|
||||||
|
uses: actions/setup-go@v3
|
||||||
|
with:
|
||||||
|
go-version: '1.20'
|
||||||
|
cache: true
|
||||||
|
|
||||||
|
- name: Install staticcheck
|
||||||
|
run: make staticcheck-install
|
||||||
|
|
||||||
|
- name: Run staticcheck
|
||||||
|
run: make staticcheck-run
|
||||||
|
|
6
Makefile
6
Makefile
|
@ -135,8 +135,12 @@ pre-commit-run:
|
||||||
lint:
|
lint:
|
||||||
@golangci-lint --timeout=5m run
|
@golangci-lint --timeout=5m run
|
||||||
|
|
||||||
|
# Install staticcheck
|
||||||
|
staticcheck-install:
|
||||||
|
@go install honnef.co/go/tools/cmd/staticcheck@latest
|
||||||
|
|
||||||
# Run staticcheck
|
# Run staticcheck
|
||||||
staticcheck:
|
staticcheck-run:
|
||||||
@staticcheck ./...
|
@staticcheck ./...
|
||||||
|
|
||||||
# Run linters in Docker
|
# Run linters in Docker
|
||||||
|
|
Loading…
Reference in a new issue