@@ -13,71 +13,48 @@ concurrency:
1313 group : ${{ github.workflow }}-${{ github.ref }}
1414 cancel-in-progress : true
1515
16- on :
17- push :
18- pull_request :
16+ on : [push, pull_request]
1917
2018jobs :
21-
22- linux :
23- name : Test ${{ matrix.platform }} (${{ matrix.go }})
19+ ci :
20+ name : ${{ matrix.platform }} (${{ matrix.go-version || 'oldest' }})
2421 timeout-minutes : 10
2522 strategy :
2623 fail-fast : false
2724 matrix :
28- go : ["1.18.x", "oldstable", "stable"]
29- platform : [ubuntu-24.04]
30- runs-on : ${{ matrix.platform }}
31- steps :
32- - name : Install Go ${{ matrix.go }}
33- uses : actions/setup-go@v5
34- with :
35- go-version : ${{ matrix.go }}
36- - name : Setup IPv6
37- run : sudo sysctl -w net.ipv6.conf.lo.disable_ipv6=0 net.ipv6.conf.default.disable_ipv6=0 net.ipv6.conf.all.disable_ipv6=0
38- - name : Checkout code
39- uses : actions/checkout@v4
40- - name : Build for ${{ matrix.platform }}
41- run : go build ./...
42- - name : Test
43- run : go test -exec sudo -v ./...
25+ go-version :
26+ - " " # do not specify go-version to fall back on go-version-file (use go.mod); see https://github.com/actions/setup-go/issues/450#issuecomment-3620402646
27+ - " oldstable"
28+ - " stable"
29+ platform : [ubuntu-24.04, windows-latest, macos-latest]
30+ include :
31+ - platform : ubuntu-24.04
32+ test-cmd : go test -exec sudo -v ./...
33+ ipv6 : true
34+ - platform : windows-latest
35+ test-cmd : go test -v ./...
36+ ipv6 : false
37+ - platform : macos-latest
38+ test-cmd : go test -v ./...
39+ ipv6 : false
4440
45- other :
46- name : Test ${{ matrix.platform }} (${{ matrix.go }})
47- timeout-minutes : 10
48- strategy :
49- fail-fast : false
50- matrix :
51- go : ["1.18.x", "oldstable", "stable"]
52- platform : [windows-latest, macos-latest]
5341 runs-on : ${{ matrix.platform }}
5442 steps :
55- - name : Install Go ${{ matrix.go }}
56- uses : actions/setup-go@v5
57- with :
58- go-version : ${{ matrix.go }}
43+ - name : Setup IPv6
44+ if : matrix.ipv6
45+ run : sudo sysctl -w net.ipv6.conf.lo.disable_ipv6=0 net.ipv6.conf.default.disable_ipv6=0 net.ipv6.conf.all.disable_ipv6=0
5946 - name : Checkout code
60- uses : actions/checkout@v4
61- - name : Build for ${{ matrix.platform }}
62- run : go build ./...
63- - name : Test
64- run : go test -v ./...
65-
66- lint :
67- name : Lint ${{ matrix.platform }}
68- timeout-minutes : 10
69- strategy :
70- fail-fast : false
71- matrix :
72- platform : [ubuntu-24.04, windows-latest, macos-latest]
73- runs-on : ${{ matrix.platform }}
74- steps :
75- - uses : actions/checkout@v4
76- - uses : actions/setup-go@v5
47+ uses : actions/checkout@v6
48+ - name : Install Go ${{ matrix.go-version }}
49+ uses : actions/setup-go@v6
7750 with :
78- go-version : " stable "
79- cache : false
80- - name : golangci-lint
81- uses : golangci/golangci-lint-action@v7
51+ go-version : ${{ matrix.go-version }}
52+ go-version-file : " go.mod " # used when go-version is not specified.
53+ - name : Lint
54+ uses : golangci/golangci-lint-action@v9
8255 with :
83- args : --timeout=5m
56+ args : --timeout=5m --verbose
57+ - name : Build
58+ run : go build ./...
59+ - name : Test
60+ run : ${{ matrix.test-cmd }}
0 commit comments