Skip to content

Commit afc3f57

Browse files
committed
Add setup-go step
1 parent b3297bf commit afc3f57

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

.github/workflows/lint.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@ defaults:
1616
run:
1717
shell: bash
1818

19-
env:
20-
GOLANGCI_TIMEOUT: 10m0s
21-
2219
jobs:
2320

2421
lint:
@@ -27,7 +24,12 @@ jobs:
2724
steps:
2825
- name: Checkout Repository
2926
uses: actions/checkout@v2
27+
- name: Output Variables
28+
id: vars
29+
run: echo "::set-output name=go_version::$(grep "go 1." go.mod | cut -d " " -f 2)"
30+
- name: Setup Golang Environment
31+
uses: actions/setup-go@v2
32+
with:
33+
go-version: ${{ steps.vars.outputs.go_version }}
3034
- name: Lint Code
3135
uses: golangci/golangci-lint-action@v3
32-
with:
33-
args: --timeout ${{ env.GOLANGCI_TIMEOUT }}

.golangci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,5 @@ linters:
6060
issues:
6161
max-issues-per-linter: 0
6262
max-same-issues: 0
63+
run:
64+
timeout: 5m

0 commit comments

Comments
 (0)