Try using revive for test-style

Signed-off-by: Josh Dolitsky <josh@dolit.ski>
pull/10349/head
Josh Dolitsky 4 years ago
parent 6af1b7713f
commit b4728884ed
No known key found for this signature in database
GPG Key ID: B2B93673243A65FB

@ -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

@ -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

Loading…
Cancel
Save