diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml new file mode 100644 index 0000000..8095bc3 --- /dev/null +++ b/.github/workflows/golangci-lint.yml @@ -0,0 +1,27 @@ +name: golangci-lint +on: + push: + tags: + - v* + branches: + - master + - main + pull_request: +permissions: + contents: read + # Optional: allow read access to pull request. Use with `only-new-issues` option. + # pull-requests: read +jobs: + golangci: + name: lint + runs-on: ubuntu-latest + steps: + - uses: actions/setup-go@v3 + with: + go-version: 1.17 + - uses: actions/checkout@v3 + - name: golangci-lint + uses: golangci/golangci-lint-action@v3 + with: + # Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version + version: v1.46 diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index d4b691b..218d886 100755 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -18,8 +18,6 @@ jobs: run: make deps - name: Unit test run: make ci-test - - name: Linting - run: make lint - name: Acceptance test run: make build acceptance-test-docker - name: Upload coverage to Codecov diff --git a/Makefile b/Makefile index 857fd17..4e261b6 100644 --- a/Makefile +++ b/Makefile @@ -45,7 +45,7 @@ clean-deps: mkdir -p ./tmp .PHONY: deps -deps: ./bin/tparse ./bin/golangci-lint +deps: ./bin/tparse go get -v ./... go mod tidy