Skip to content

Commit a56e914

Browse files
committed
.github: run lint only on Go 1.18
1 parent 5724bd1 commit a56e914

File tree

2 files changed

+24
-7
lines changed

2 files changed

+24
-7
lines changed

.github/workflows/ci.yml

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,30 @@
11
on: [push, pull_request]
22
name: Test
33
jobs:
4+
lint:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- name: Install Go
8+
uses: WillAbides/setup-go-faster@main
9+
with:
10+
go-version: 1.18.x
11+
- uses: actions/checkout@v2
12+
with:
13+
path: './src/github.com/kevinburke/ssh_config'
14+
# staticcheck needs this for GOPATH
15+
- run: |
16+
echo "GO111MODULE=off" >> $GITHUB_ENV
17+
echo "GOPATH=$GITHUB_WORKSPACE" >> $GITHUB_ENV
18+
echo "PATH=$GITHUB_WORKSPACE/bin:$PATH" >> $GITHUB_ENV
19+
- name: Run tests
20+
run: make lint
21+
working-directory: './src/github.com/kevinburke/ssh_config'
22+
423
test:
524
strategy:
625
matrix:
726
go-version: [1.17.x, 1.18.x]
8-
platform: [ubuntu-latest]
9-
runs-on: ${{ matrix.platform }}
27+
runs-on: ubuntu-latest
1028
steps:
1129
- name: Install Go
1230
uses: WillAbides/setup-go-faster@main
@@ -15,11 +33,10 @@ jobs:
1533
- uses: actions/checkout@v2
1634
with:
1735
path: './src/github.com/kevinburke/ssh_config'
18-
# staticcheck needs this for GOPATH
1936
- run: |
2037
echo "GO111MODULE=off" >> $GITHUB_ENV
2138
echo "GOPATH=$GITHUB_WORKSPACE" >> $GITHUB_ENV
2239
echo "PATH=$GITHUB_WORKSPACE/bin:$PATH" >> $GITHUB_ENV
23-
- name: Run tests
24-
run: make lint race-test
40+
- name: Run tests with race detector on
41+
run: make race-test
2542
working-directory: './src/github.com/kevinburke/ssh_config'

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ lint: $(STATICCHECK)
99
go vet ./...
1010
$(STATICCHECK)
1111

12-
test: lint
12+
test:
1313
@# the timeout helps guard against infinite recursion
1414
go test -timeout=250ms ./...
1515

16-
race-test: lint
16+
race-test:
1717
go test -timeout=500ms -race ./...
1818

1919
$(BUMP_VERSION):

0 commit comments

Comments
 (0)