Skip to content

Commit

Permalink
use golangci-lint
Browse files Browse the repository at this point in the history
  • Loading branch information
acoshift committed May 10, 2023
1 parent 53ce57b commit f52d3bd
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 10 deletions.
23 changes: 16 additions & 7 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,23 @@ name: Test
on:
push:
pull_request:
permissions:
contents: read
jobs:
runner-job:
lint:
name: lint
runs-on: ubuntu-latest
strategy:
matrix:
go: ['1.20']
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
test:
runs-on: ubuntu-latest
strategy:
matrix:
Expand All @@ -16,11 +31,5 @@ jobs:
go-version: ${{ matrix.go }}
- run: go get -t -v ./...
- run: go vet ./...
- uses: dominikh/[email protected]
with:
version: v0.4.3
install-go: false
cache-key: ${{ matrix.go }}
working-directory: ${{ matrix.dir }}
- run: go test -race -coverprofile=coverage.out -covermode=atomic -coverpkg=./... ./...
- uses: codecov/codecov-action@v3
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
default: vet staticcheck test
default: vet lint test

test:
go test -race ./...

vet:
go vet ./...

staticcheck:
staticcheck ./...
lint:
golangci-lint run

0 comments on commit f52d3bd

Please sign in to comment.