-
Notifications
You must be signed in to change notification settings - Fork 11
44 lines (38 loc) · 1.12 KB
/
ci.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
on: [push, pull_request]
name: ci
jobs:
all:
strategy:
matrix:
go-version: [1.18, 1.19, 1.x]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: install go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: checkout code
uses: actions/checkout@v2
- name: build
run: make build
# For earlier go versions, staticcheck build fails due to:
#
# ../../../go/pkg/mod/honnef.co/go/[email protected]/go/ir/builder.go:36:2:
# //go:build comment without // +build comment
#
# or due to:
#
# ../../../go/pkg/mod/honnef.co/go/[email protected]/staticcheck/lint.go:4030:36:
# sel.Obj().(*types.Func).Origin undefined (type *types.Func has no field
# or method Origin)
# note: module requires Go 1.19
#
- name: install vet tools (go 1.19 or later)
if: ${{ matrix.go-version >= '1.19' }}
run: make install-vet
- name: vet (go 1.19 or later)
if: ${{ matrix.go-version >= '1.19' }}
run: make vet
- name: test
run: make test