-
Notifications
You must be signed in to change notification settings - Fork 3
45 lines (37 loc) · 935 Bytes
/
go.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
name: Go
on: [push]
jobs:
build:
name: Build
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macOS-latest, ubuntu-latest]
goversion: [1.16, 1.17]
steps:
- name: Set up Go ${{matrix.goversion}} on ${{matrix.os}}
uses: actions/setup-go@v1
with:
go-version: ${{matrix.goversion}}
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v1
- name: gofmt
run: |
[[ -z $(gofmt -l $(find . -name '*.go') ) ]]
- name: Get dependencies
env:
GO111MODULE: on
run: go mod download
- name: Vet
env:
GO111MODULE: on
run: go vet -mod=readonly ./...
- name: Test
env:
GO111MODULE: on
run: go test -mod=readonly -v -count 2 ./...
- name: Race Test
env:
GO111MODULE: on
run: go test -race -mod=readonly -v -count 2 ./...