File tree Expand file tree Collapse file tree 2 files changed +38
-15
lines changed Expand file tree Collapse file tree 2 files changed +38
-15
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 1
1
# This file was copied from the following URL and modified:
2
2
# https://github.com/golangci/golangci-lint-action/blob/master/README.md#how-to-use
3
3
4
- name : golangci
4
+ name : golangci-lint
5
5
on :
6
6
push :
7
7
tags :
8
8
- v*
9
9
branches :
10
- - master
11
10
- main
12
11
pull_request :
12
+
13
13
permissions :
14
14
contents : read
15
15
pull-requests : read
16
+
16
17
jobs :
17
18
golangci :
18
19
name : lint
19
- strategy :
20
- matrix :
21
- go-version : [1.20.x, 1.21.x]
22
- platform : [ubuntu-latest, macos-latest]
23
- runs-on : ${{ matrix.platform }}
20
+ runs-on : ubuntu-latest
24
21
steps :
25
- - uses : actions/checkout@v2
26
- - uses : actions/setup-go@v3
22
+ - uses : actions/checkout@v3
23
+ - uses : actions/setup-go@v4
27
24
with :
28
- go-version : ${{ matrix.go-version }}
25
+ go-version : 1.21.x
26
+ cache : false
29
27
- name : golangci-lint
30
28
uses : golangci/golangci-lint-action@v3
31
29
with :
32
- version : v1.53.3 # current version at time of commit
33
- args : --timeout 10m
34
- only-new-issues : true
35
- - name : go-test
36
- run : go test ./...
30
+ version : v1.54 # current version at time of commit
31
+ args : --timeout=10m
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