-
-
Notifications
You must be signed in to change notification settings - Fork 888
75 lines (66 loc) · 1.63 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
name: test
on:
push:
pull_request:
jobs:
test:
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
go:
- '1.17.0-rc2'
- '1.16'
- '1.15'
- '1.14'
- '1.13'
- '1.12'
runs-on: ${{ matrix.os }}
steps:
- name: setup Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}
stable: false # for Go 1.17.0-rc2, it's not stable now. (2021-08-03)
- name: checkout
uses: actions/checkout@v2
- name: test
run: |
go test --race ./...
lint:
runs-on: ubuntu-latest
steps:
- name: setup Go
uses: actions/setup-go@v2
- name: checkout
uses: actions/checkout@v2
- name: gofmt
run: |
test -z "$(gofmt -s -d . | tee /dev/stderr)"
- name: vet
run: |
go vet ./...
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
continue-on-error: true
with:
version: v1.41.1
# this is here as a workaround for https://github.com/golangci/golangci-lint-action/issues/244
skip-pkg-cache: true
test-illumos:
runs-on: macos-latest
name: Test in illumos VM
steps:
- uses: actions/checkout@v2
- name: Test on illumos
id: test
uses: papertigers/illumos-vm@main
with:
prepare: |
pkg set-publisher -r -O https://pkg.omnios.org/r151036/extra extra.omnios
pkg install go-116
run: |
/opt/ooce/go-1.16/bin/go test