-
Notifications
You must be signed in to change notification settings - Fork 101
69 lines (64 loc) · 1.8 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
linux:
name: Test ${{ matrix.platform }} (${{ matrix.go }})
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
go: ["1.13.x", "1.20.x", "1.21.x"]
platform: [ubuntu-20.04]
runs-on: ${{ matrix.platform }}
steps:
- name: Install Go ${{ matrix.go }}
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}
- name: Setup IPv6
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
- name: Checkout code
uses: actions/checkout@v2
- name: Build for ${{ matrix.platform }}
run: go build ./...
- name: Test
run: go test -exec sudo -v ./...
other:
name: Test ${{ matrix.platform }} (${{ matrix.go }})
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
go: ["1.13.x", "1.20.x", "1.21.x"]
platform: [windows-latest, macos-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: Install Go ${{ matrix.go }}
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}
- name: Checkout code
uses: actions/checkout@v2
- name: Build for ${{ matrix.platform }}
run: go build ./...
- name: Test
run: go test -v ./...
lint:
name: Lint ${{ matrix.platform }}
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
platform: [ubuntu-20.04, windows-latest, macos-latest]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v2
- uses: golangci/golangci-lint-action@v2
with:
# must be specified without patch version
version: v1.55
args: --timeout=5m