Skip to content

Commit

Permalink
ci: use golangci-lint-action v3
Browse files Browse the repository at this point in the history
It needs golang to be installed (if the default golang which comes
preinstalled in Ubuntu is not new/good enough).

Let's use 1.17.x. We could have used 1.x instead but this might bring
some failures when golang version is updated.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
  • Loading branch information
kolyshkin committed Mar 7, 2022
1 parent f7d4613 commit ad01a22
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/validate.yml
Expand Up @@ -7,13 +7,18 @@ on:
- master
- release-*
pull_request:
env:
GO_VERSION: 1.17.x

jobs:

lint:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v2
with:
go-version: "${{ env.GO_VERSION }}"
- name: install deps
run: |
sudo apt -q update
Expand All @@ -30,6 +35,9 @@ jobs:
contents: read
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v2
with:
go-version: "${{ env.GO_VERSION }}"
- name: install deps
run: |
sudo apt -q update
Expand All @@ -51,7 +59,7 @@ jobs:
- name: install go
uses: actions/setup-go@v2
with:
go-version: 1.x # Latest stable
go-version: "${{ env.GO_VERSION }}"
- name: compile with no build tags
run: make BUILDTAGS=""

Expand Down Expand Up @@ -118,7 +126,7 @@ jobs:
- name: install go
uses: actions/setup-go@v2
with:
go-version: 1.x # Latest stable
go-version: "${{ env.GO_VERSION }}"
- name: cache go mod and $GOCACHE
uses: actions/cache@v2
with:
Expand Down

0 comments on commit ad01a22

Please sign in to comment.