Skip to content

Commit

Permalink
Install golangci-lint as a separate step
Browse files Browse the repository at this point in the history
In order to avoid the directory changing shenanigans. Also use a custom
Go version instead of the system provided one.
  • Loading branch information
Ivan Mirić committed Sep 30, 2020
1 parent 4caaea7 commit b792ac6
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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" ./...
Expand Down

0 comments on commit b792ac6

Please sign in to comment.