forked from fsnotify/fsnotify
57 lines (48 loc) · 1.08 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
name: test
on: [push]
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@v2
with:
stable: 'false'
go-version: ${{ matrix.go }}
- 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
with:
go-version: '1.17'
- 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: latest
skip-go-installation: true