Skip to content

Commit

Permalink
ci: extend lint checks
Browse files Browse the repository at this point in the history
  • Loading branch information
thde committed Dec 13, 2023
1 parent ff4b7b9 commit 64b5f36
Showing 1 changed file with 28 additions and 4 deletions.
32 changes: 28 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: golangci-lint
name: test

on:
push:
Expand All @@ -18,7 +18,25 @@ jobs:
steps:
- uses: WillAbides/[email protected]
with:
go-version: ^1.18
go-version: ^1.21.5
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: actions/cache@v3
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- run: go mod download -x
- run: go test -v ./... -race -bench=. -benchmem -cover -coverprofile cover.out 2>&1 | tee test.out
- run: go tool cover -func cover.out
lint:
runs-on: ubuntu-latest
steps:
- uses: WillAbides/[email protected]
with:
go-version: ^1.21.5
- uses: actions/checkout@v4
with:
fetch-depth: 1
Expand All @@ -34,5 +52,11 @@ jobs:
- uses: dominikh/[email protected]
with:
install-go: false
- run: go test -v ./... -race -bench=. -benchmem -cover -coverprofile cover.out 2>&1 | tee test.out
- run: go tool cover -func cover.out
- uses: golangci/golangci-lint-action@v3
with:
version: latest
args: >
--enable
asasalint,bidichk,dupword,errchkjson,godot,gofumpt,gosec,gosimple,ineffassign,misspell,loggercheck,revive,unused
--disable
errcheck

0 comments on commit 64b5f36

Please sign in to comment.