Skip to content
This repository was archived by the owner on May 24, 2023. It is now read-only.

Commit a248420

Browse files
committed
Add setup-go step
1 parent feee1f2 commit a248420

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
@@ -15,9 +15,6 @@ defaults:
1515
run:
1616
shell: bash
1717

18-
env:
19-
GOLANGCI_TIMEOUT: 10m0s
20-
2118
jobs:
2219

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

.golangci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,5 @@ linters:
6363
issues:
6464
max-issues-per-linter: 0
6565
max-same-issues: 0
66+
run:
67+
timeout: 5m

0 commit comments

Comments
 (0)