File tree Expand file tree Collapse file tree 2 files changed +37
-13
lines changed Expand file tree Collapse file tree 2 files changed +37
-13
lines changed Original file line number Diff line number Diff line change 1+ name : go-test
2+
3+ on :
4+ push :
5+ tags :
6+ - v*
7+ branches :
8+ - main
9+ pull_request :
10+
11+ jobs :
12+ go-test :
13+ name : go-test
14+ strategy :
15+ matrix :
16+ go-version : [1.20.x, 1.21.x]
17+ # XXX: is it actually useful to run unit tests on macOS?
18+ platform : [ubuntu-latest, macos-latest]
19+ runs-on : ${{ matrix.platform }}
20+ steps :
21+ - uses : actions/checkout@v3
22+ - uses : actions/setup-go@v4
23+ with :
24+ go-version : ${{ matrix.go-version }}
25+ - name : go-test
26+ run : go test ./...
Original file line number Diff line number Diff line change 11# This file was copied from the following URL and modified:
22# https://github.com/golangci/golangci-lint-action/blob/master/README.md#how-to-use
33
4- name : golangci
4+ name : golangci-lint
55on :
66 push :
77 tags :
88 - v*
99 branches :
1010 - main
1111 pull_request :
12+
1213permissions :
1314 contents : read
1415 pull-requests : read
16+
1517jobs :
1618 golangci :
1719 name : lint
18- strategy :
19- matrix :
20- go-version : [1.20.x, 1.21.x]
21- platform : [ubuntu-latest, macos-latest]
22- runs-on : ${{ matrix.platform }}
20+ runs-on : ubuntu-latest
2321 steps :
24- - uses : actions/checkout@v2
25- - uses : actions/setup-go@v3
22+ - uses : actions/checkout@v3
23+ - uses : actions/setup-go@v4
2624 with :
27- go-version : ${{ matrix.go-version }}
25+ go-version : 1.21.x
26+ cache : false
2827 - name : golangci-lint
2928 uses : golangci/golangci-lint-action@v3
3029 with :
31- version : v1.53.3 # current version at time of commit
30+ version : v1.54 # current version at time of commit
3231 args : --timeout=10m
33- only-new-issues : true
34- - name : go-test
35- run : go test ./...
32+ # Only show new issues in a PR but show all issues for pushes
33+ only-new-issues : ${{ github.event_name == 'pull_request' && 'true' || 'false' }}
You can’t perform that action at this time.
0 commit comments