From b792ac6f2b5add072d80b564250a7acb57acc389 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20Miri=C4=87?= Date: Wed, 30 Sep 2020 12:59:02 +0200 Subject: [PATCH] Install golangci-lint as a separate step In order to avoid the directory changing shenanigans. Also use a custom Go version instead of the system provided one. --- .github/workflows/all.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/all.yml b/.github/workflows/all.yml index e20ccf95fb0..7d52cf327c9 100644 --- a/.github/workflows/all.yml +++ b/.github/workflows/all.yml @@ -43,13 +43,15 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - - name: Lint + - name: Install Go + uses: actions/setup-go@v2 + with: + go-version: 1.14.x + - name: Install golangci-lint + working-directory: /tmp + run: go get github.com/golangci/golangci-lint/cmd/golangci-lint@$GOLANGCI_VERSION + - name: Run linters run: | - pushd . - cd $(mktemp -d) - go get github.com/golangci/golangci-lint/cmd/golangci-lint@$GOLANGCI_VERSION - export PATH="$HOME/go/bin:$PATH" - popd BASEREV=$(git merge-base HEAD origin/master) echo "Base revision: $BASEREV" golangci-lint run --out-format=tab --new-from-rev "$BASEREV" ./...