From 3932247076a82a1192f268b3f57322bd8a5822d5 Mon Sep 17 00:00:00 2001 From: hasheddan Date: Mon, 19 Apr 2021 15:38:55 -0500 Subject: [PATCH] Lint with same go version as build Updates lint workflow to setup go version beforehand so that it uses the same as all build and publish workflows. Signed-off-by: hasheddan --- .github/workflows/ci.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2e22da9dfe5..60a1edfc103 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -47,6 +47,11 @@ jobs: with: submodules: true + - name: Setup Go + uses: actions/setup-go@v2 + with: + go-version: ${{ env.GO_VERSION }} + - name: Find the Go Build Cache id: go run: echo "::set-output name=cache::$(go env GOCACHE)" @@ -68,14 +73,14 @@ jobs: - name: Vendor Dependencies run: make vendor vendor.check - # This action uses its own setup-go, which always seems to use the latest - # stable version of Go. We could run 'make lint' to ensure our desired Go - # version, but we prefer this action because it leaves 'annotations' (i.e. - # it comments on PRs to point out linter violations). + # We could run 'make lint' to ensure our desired Go version, but we prefer + # this action because it leaves 'annotations' (i.e. it comments on PRs to + # point out linter violations). - name: Lint uses: golangci/golangci-lint-action@v2 with: version: ${{ env.GOLANGCI_VERSION }} + skip-go-installation: true check-diff: runs-on: ubuntu-18.04