linting enabled in workflow

This commit is contained in:
neilotoole 2022-12-24 21:20:04 -07:00
parent 70e650ef87
commit bc626a4117

View File

@ -8,8 +8,10 @@ on:
env: env:
GO_VERSION: 1.19.3 GO_VERSION: 1.19.3
GORELEASER_VERSION: 1.12.3 GORELEASER_VERSION: 1.12.3
GOLANGCI_LINT_VERSION: 1.50.1
jobs: jobs:
go-test: go-test:
strategy: strategy:
matrix: matrix:
@ -31,10 +33,25 @@ jobs:
- name: Build - name: Build
run: go build -v ./... run: go build -v ./...
- name: Lint
- name: Test - name: Test
run: go test -v ./... run: go test -v ./...
go-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
- uses: actions/checkout@v3
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: ${{ env.GOLANGCI_LINT_VERSION }}
build-binaries-darwin: build-binaries-darwin:
needs: go-test needs: go-test
if: startsWith(github.ref, 'refs/tags/v') if: startsWith(github.ref, 'refs/tags/v')
@ -172,7 +189,7 @@ jobs:
publish: publish:
if: startsWith(github.ref, 'refs/tags/v') if: startsWith(github.ref, 'refs/tags/v')
needs: [ build-binaries-darwin, build-binaries-linux-amd64, build-binaries-linux-arm64, build-binaries-windows ] needs: [ go-lint, build-binaries-darwin, build-binaries-linux-amd64, build-binaries-linux-arm64, build-binaries-windows ]
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
steps: steps: