diff --git a/.github/workflows/build-pr.yml b/.github/workflows/build-pr.yml index 432a6465e..a14762074 100644 --- a/.github/workflows/build-pr.yml +++ b/.github/workflows/build-pr.yml @@ -12,7 +12,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v2 with: - go-version: '1.16' + go-version: '1.17' - name: Install golangci-lint run: | curl -sSLO https://github.com/golangci/golangci-lint/releases/download/v$GOLANGCI_LINT_VERSION/golangci-lint-$GOLANGCI_LINT_VERSION-linux-amd64.tar.gz @@ -23,7 +23,17 @@ jobs: env: GOLANGCI_LINT_VERSION: '1.43.0' GOLANGCI_LINT_SHA256: 'f3515cebec926257da703ba0a2b169e4a322c11dc31a8b4656b50a43e48877f4' + - name: Install revive + run: | + curl -sSLO https://github.com/mgechev/revive/releases/download/v${REVIVE_VERSION}/revive_${REVIVE_VERSION}_Linux_x86_64.tar.gz + shasum -a 256 revive_${REVIVE_VERSION}_Linux_x86_64.tar.gz | grep "^${REVIVE_SHA256} " > /dev/null + tar -xf revive_${REVIVE_VERSION}_Linux_x86_64.tar.gz + mv revive /usr/local/bin/revive + rm -rf revive_${REVIVE_VERSION}_Linux_x86_64.tar.gz + env: + REVIVE_VERSION: '1.1.2' + REVIVE_SHA256: 'f0ed25f61cf531e8023ae6b547731a1a75c5dedd2e8c9bd91da8f30103b7bdd2' - name: Test style - run: make test-style + run: make test-style-revive || make test-style - name: Run unit tests run: make test-coverage diff --git a/Makefile b/Makefile index 555484fcd..448050d35 100644 --- a/Makefile +++ b/Makefile @@ -116,6 +116,11 @@ test-style: GO111MODULE=on golangci-lint run @scripts/validate-license.sh +.PHONY: test-style-revive +test-style-revive: + GO111MODULE=on revive ./... + @scripts/validate-license.sh + .PHONY: test-acceptance test-acceptance: TARGETS = linux/amd64 test-acceptance: build build-cross