Skip to content

Commit b2a40db

Browse files
committed
ci: run statick check only with latest Go version
1 parent 186cf2b commit b2a40db

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

.github/workflows/echo-contrib.yml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,15 @@ on:
2020
- '.github/**'
2121
- 'codecov.yml'
2222

23+
env:
24+
latest: '1.17'
25+
2326
jobs:
2427
test:
2528
strategy:
2629
matrix:
2730
os: [ubuntu-latest, macos-latest, windows-latest]
28-
go: [1.14, 1.15, 1.16]
31+
go: [1.14, 1.15, 1.16, 1.17]
2932
name: ${{ matrix.os }} @ Go ${{ matrix.go }}
3033
runs-on: ${{ matrix.os }}
3134
steps:
@@ -39,17 +42,19 @@ jobs:
3942
with:
4043
ref: ${{ github.ref }}
4144

42-
- name: Install Dependencies
43-
run: go get -u honnef.co/go/tools/cmd/staticcheck@latest
45+
- name: Run static checks
46+
if: matrix.go == env.latest && matrix.os == 'ubuntu-latest'
47+
run: |
48+
go get -u honnef.co/go/tools/cmd/staticcheck@latest
49+
staticcheck -tests=false ./...
4450
4551
- name: Run Tests
4652
run: |
47-
staticcheck -tests=false ./...
4853
go test -race --coverprofile=coverage.coverprofile --covermode=atomic ./...
4954
5055
- name: Upload coverage to Codecov
51-
if: success() && matrix.go == 1.16 && matrix.os == 'ubuntu-latest'
52-
uses: codecov/codecov-action@v1
56+
if: success() && matrix.go == env.latest && matrix.os == 'ubuntu-latest'
57+
uses: codecov/codecov-action@v2
5358
with:
5459
token:
5560
fail_ci_if_error: false
@@ -58,7 +63,7 @@ jobs:
5863
strategy:
5964
matrix:
6065
os: [ubuntu-latest]
61-
go: [1.16]
66+
go: [1.17]
6267
name: Benchmark comparison ${{ matrix.os }} @ Go ${{ matrix.go }}
6368
runs-on: ${{ matrix.os }}
6469
steps:

0 commit comments

Comments
 (0)