2
2
# See https://github.com/protocol/.github/ for details.
3
3
4
4
on : [push, pull_request]
5
+ name : Go Test
5
6
6
7
jobs :
7
8
unit :
11
12
os : [ "ubuntu", "windows", "macos" ]
12
13
go : [ "1.15.x", "1.16.x" ]
13
14
runs-on : ${{ matrix.os }}-latest
14
- name : Unit tests ( ${{ matrix.os}}, Go ${{ matrix.go }})
15
+ name : ${{ matrix.os}} (go ${{ matrix.go }})
15
16
steps :
16
17
- uses : actions/checkout@v2
18
+ with :
19
+ submodules : recursive
17
20
- uses : actions/setup-go@v2
18
21
with :
19
22
go-version : ${{ matrix.go }}
@@ -22,17 +25,23 @@ jobs:
22
25
go version
23
26
go env
24
27
- name : Run tests
25
- run : go test -v -coverprofile coverage.txt ./...
28
+
29
+ with :
30
+ run : go test -v -coverprofile coverage.txt ./...
26
31
- name : Run tests (32 bit)
27
32
if : ${{ matrix.os != 'macos' }} # can't run 32 bit tests on OSX.
33
+
28
34
env :
29
35
GOARCH : 386
30
- run : go test -v ./...
36
+ with :
37
+ run : go test -v ./...
31
38
- name : Run tests with race detector
32
39
if : ${{ matrix.os == 'ubuntu' }} # speed things up. Windows and OSX VMs are slow
33
- run : go test -v -race ./...
40
+
41
+ with :
42
+ run : go test -v -race ./...
34
43
- name : Upload coverage to Codecov
35
- uses : codecov/codecov-action@967e2b38a85a62bd61be5529ada27ebc109948c2 # v1.4.1
44
+ uses : codecov/codecov-action@a1ed4b322b4b38cb846afb5a0ebfa17086917d27 # v1.5.0
36
45
with :
37
46
file : coverage.txt
38
47
env_vars : OS=${{ matrix.os }}, GO=${{ matrix.go }}
0 commit comments