-
Notifications
You must be signed in to change notification settings - Fork 1
71 lines (63 loc) · 1.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
name: test
on:
push:
pull_request:
jobs:
test:
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
go:
- '1.18.0-beta1'
- '1.17'
- '1.16'
runs-on: ${{ matrix.os }}
steps:
- name: setup Go
uses: actions/setup-go@v3
with:
stable: 'false'
go-version: ${{ matrix.go }}
- name: checkout
uses: actions/checkout@v3
- name: test
run: |
go test --race ./...
testFreeBSD:
runs-on: macos-10.15
name: test (freebsd, 1.17)
steps:
- uses: actions/checkout@v3
- name: test (freebsd, 1.17)
id: test
uses: vmactions/freebsd-vm@v0.1.6
with:
usesh: true
prepare: pkg install -y go
run: |
go test
lint:
runs-on: ubuntu-latest
steps:
- name: setup Go
uses: actions/setup-go@v3
with:
go-version: '1.17'
- name: checkout
uses: actions/checkout@v3
- name: gofmt
run: |
test -z "$(gofmt -s -d . | tee /dev/stderr)"
- name: vet
run: |
go vet ./...
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
continue-on-error: true
with:
version: latest
skip-go-installation: true