-
Notifications
You must be signed in to change notification settings - Fork 43
59 lines (52 loc) · 1.21 KB
/
tests.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
name: Tests
on:
push: { }
pull_request: { }
workflow_dispatch: { }
jobs:
lint:
name: Lint
strategy:
matrix:
os:
- macos-latest
- ubuntu-latest
- windows-latest
go-version:
- ^1.16
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
with:
version: v1.37
build:
name: Build and test
strategy:
matrix:
os:
- macos-latest
- ubuntu-latest
- windows-latest
go:
- ^1.16
runs-on: ${{ matrix.os }}
steps:
- name: Setup Go ${{ matrix.go }}
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}
- name: Checkout source code into the current working directory
uses: actions/checkout@v2
- name: Cache Go Modules
uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Test
run: go test -v ./...
- name: Build
run: go build -v ./...