81 lines (75 loc) · 2.04 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
70
71
72
73
74
75
76
77
78
79
80
81
name: test
on:
push:
pull_request:
jobs:
test:
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-11
- macos-12
- windows-latest
go:
- '1.16'
- '1.18'
runs-on: ${{ matrix.os }}
steps:
- name: setup Go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
- name: checkout
uses: actions/checkout@v3
- name: test
run: |
go test -race ./...
testFreeBSD:
runs-on: macos-12
name: test (freebsd, 1.18)
steps:
- uses: actions/checkout@v3
- name: test (freebsd, 1.18)
id: test
uses: vmactions/freebsd-vm@v0.2.0
with:
usesh: true
prepare: pkg install -y go
run: |
go test -race ./...
testOpenBSD:
runs-on: macos-12
name: test (openbsd, 1.17)
steps:
- uses: actions/checkout@v3
- name: test (openbsd, 1.17)
id: test
uses: vmactions/openbsd-vm@v0.0.6
with:
prepare: pkg_add go
run: |
# Default of 512 leads to "too many open files".
ulimit -n 1024
# No -race as the VM doesn't include the comp set.
#
# TODO: should probably add this, but on my local machine the tests
# time out with -race as the waits aren't long enough (OpenBSD
# is kind of slow), so should probably look into that first.
# Go 1.19 is supposed to have a much faster race detector, so
# maybe waiting until we have that is enough.
go test ./...
testNetBSD:
runs-on: macos-12
name: test (netbsd, 1.17)
steps:
- uses: actions/checkout@v3
- name: test (netbsd, 1.17)
id: test
uses: vmactions/netbsd-vm@v0.0.4
with:
prepare: pkg_add go
run: |
# TODO: no -race for the same reason as OpenBSD (the timing; it does run).
go117 test ./...