-
Notifications
You must be signed in to change notification settings - Fork 1
102 lines (92 loc) · 2.4 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
name: test
on:
push:
pull_request:
jobs:
test:
strategy:
fail-fast: false
matrix:
os:
- ubuntu-20.04
- ubuntu-22.04
- macos-13
- macos-12
- macos-11
- windows-2022
# TODO:
# fix: exit status 0xc0000139
# TempDir RemoveAll cleanup: CreateFile C:\Users\RUNNER~1\AppData\Local\Temp\TestRemoveno_race3228270686\001: Access is denied.
# - windows-2019
go:
- "1.22"
- "1.21"
- "1.20"
- "1.19"
- "1.18"
- "1.17"
runs-on: ${{ matrix.os }}
steps:
- name: checkout
uses: actions/checkout@v4
- name: setup Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- name: test
run: |
go test --race ./...
# OpenBSD
openbsd:
runs-on: "ubuntu-22.04"
timeout-minutes: 30
name: "test (openbsd, 1.21)"
steps:
- uses: "actions/checkout@v4"
- name: "test (openbsd, 1.21)"
id: "openbsd"
uses: "vmactions/openbsd-vm@v1"
with:
prepare: pkg_add go
run: |
go version
useradd -mG wheel action
FSNOTIFY_BUFFER=4096 su action -c 'go test -parallel 1 -race ./...'
su action -c 'go test -parallel 1 -race ./...'
# NetBSD
netbsd:
runs-on: "ubuntu-22.04"
timeout-minutes: 30
name: test (netbsd, 1.21)
steps:
- uses: "actions/checkout@v4"
- name: "test (netbsd, 1.21)"
id: "netbsd"
uses: "vmactions/netbsd-vm@v1"
with:
prepare: pkg_add go
run: |
go121 version
useradd -mG wheel action
FSNOTIFY_BUFFER=4096 su action -c 'go121 test -parallel 1 -race ./...'
su action -c 'go121 test -parallel 1 -race ./...'
lint:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
- name: setup Go
uses: actions/setup-go@v5
with:
go-version: "1.22"
- name: gofmt
run: |
test -z "$(gofmt -s -d . | tee /dev/stderr)"
- name: vet
run: |
go vet ./...
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
continue-on-error: true
with:
version: latest