diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index b404fac..1d410d2 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -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: @@ -16,11 +31,5 @@ jobs: go-version: ${{ matrix.go }} - run: go get -t -v ./... - run: go vet ./... - - uses: dominikh/staticcheck-action@v1.3.0 - 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 diff --git a/Makefile b/Makefile index ff7278a..9aca4a4 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -default: vet staticcheck test +default: vet lint test test: go test -race ./... @@ -6,5 +6,5 @@ test: vet: go vet ./... -staticcheck: - staticcheck ./... +lint: + golangci-lint run