1
+ #
2
+ # DO NOT EDIT THIS FILE
3
+ #
4
+ # It is automatically copied from https://github.com/pion/.goassets repository.
5
+ # If this repository should have package specific CI config,
6
+ # remove the repository name from .goassets/.github/workflows/assets-sync.yml.
7
+ #
8
+ # If you want to update the shared CI config, send a PR to
9
+ # https://github.com/pion/.goassets instead of this repository.
10
+ #
11
+
1
12
name : Test
2
13
on :
3
14
push :
@@ -11,11 +22,11 @@ jobs:
11
22
runs-on : ubuntu-latest
12
23
strategy :
13
24
matrix :
14
- go : ["1.15 ", "1.16 "]
25
+ go : ["1.16 ", "1.17 "]
15
26
fail-fast : false
16
27
name : Go ${{ matrix.go }}
17
28
steps :
18
- - uses : actions/checkout@v2
29
+ - uses : actions/checkout@v3
19
30
20
31
- uses : actions/cache@v2
21
32
with :
28
39
${{ runner.os }}-amd64-go-
29
40
30
41
- name : Setup Go
31
- uses : actions/setup-go@v2
42
+ uses : actions/setup-go@v3
32
43
with :
33
44
go-version : ${{ matrix.go }}
34
45
@@ -39,11 +50,19 @@ jobs:
39
50
40
51
- name : Run test
41
52
run : |
53
+ TEST_BENCH_OPTION="-bench=."
54
+ if [ -f .github/.ci.conf ]; then . .github/.ci.conf; fi
55
+
42
56
go-acc -o cover.out ./... -- \
43
- -bench=. \
44
- -v -race
57
+ ${TEST_BENCH_OPTION} \
58
+ -v -race
59
+
60
+ - name : Run TEST_HOOK
61
+ run : |
62
+ if [ -f .github/.ci.conf ]; then . .github/.ci.conf; fi
63
+ if [ -n "${TEST_HOOK}" ]; then ${TEST_HOOK}; fi
45
64
46
- - uses : codecov/codecov-action@v1
65
+ - uses : codecov/codecov-action@v2
47
66
with :
48
67
file : ./cover.out
49
68
name : codecov-umbrella
@@ -54,11 +73,11 @@ jobs:
54
73
runs-on : ubuntu-latest
55
74
strategy :
56
75
matrix :
57
- go : ["1.15 ", "1.16 "]
76
+ go : ["1.16 ", "1.17 "]
58
77
fail-fast : false
59
78
name : Go i386 ${{ matrix.go }}
60
79
steps :
61
- - uses : actions/checkout@v2
80
+ - uses : actions/checkout@v3
62
81
63
82
- uses : actions/cache@v2
64
83
with :
@@ -73,30 +92,30 @@ jobs:
73
92
run : |
74
93
mkdir -p $HOME/go/pkg/mod $HOME/.cache
75
94
docker run \
76
- -u $(id -u):$(id -g) \
77
- -e "GO111MODULE=on" \
78
- -e "CGO_ENABLED=0" \
79
- -v $GITHUB_WORKSPACE:/go/src/github.com/pion/$(basename $GITHUB_WORKSPACE) \
80
- -v $HOME/go/pkg/mod:/go/pkg/mod \
81
- -v $HOME/.cache:/.cache \
82
- -w /go/src/github.com/pion/$(basename $GITHUB_WORKSPACE) \
83
- i386/golang:${{matrix.go}}-alpine \
84
- /usr/local/go/bin/go test \
85
- ${TEST_EXTRA_ARGS:-} \
86
- -v ./...
95
+ -u $(id -u):$(id -g) \
96
+ -e "GO111MODULE=on" \
97
+ -e "CGO_ENABLED=0" \
98
+ -v $GITHUB_WORKSPACE:/go/src/github.com/pion/$(basename $GITHUB_WORKSPACE) \
99
+ -v $HOME/go/pkg/mod:/go/pkg/mod \
100
+ -v $HOME/.cache:/.cache \
101
+ -w /go/src/github.com/pion/$(basename $GITHUB_WORKSPACE) \
102
+ i386/golang:${{matrix.go}}-alpine \
103
+ /usr/local/go/bin/go test \
104
+ ${TEST_EXTRA_ARGS:-} \
105
+ -v ./...
87
106
88
107
test-wasm :
89
108
runs-on : ubuntu-latest
90
109
strategy :
91
110
fail-fast : false
92
111
name : WASM
93
112
steps :
94
- - uses : actions/checkout@v2
113
+ - uses : actions/checkout@v3
95
114
96
115
- name : Use Node.js
97
- uses : actions/setup-node@v2
116
+ uses : actions/setup-node@v3
98
117
with :
99
- node-version : ' 12 .x'
118
+ node-version : ' 16 .x'
100
119
101
120
- uses : actions/cache@v2
102
121
with :
@@ -110,7 +129,7 @@ jobs:
110
129
- name : Download Go
111
130
run : curl -sSfL https://dl.google.com/go/go${GO_VERSION}.linux-amd64.tar.gz | tar -C ~ -xzf -
112
131
env :
113
- GO_VERSION : 1.16
132
+ GO_VERSION : 1.17
114
133
115
134
- name : Set Go Root
116
135
run : echo "GOROOT=${HOME}/go" >> $GITHUB_ENV
@@ -119,19 +138,20 @@ jobs:
119
138
run : echo "GOPATH=${HOME}/go" >> $GITHUB_ENV
120
139
121
140
- name : Set Go Path
122
- run : echo "GO_JS_WASM_EXEC=${PWD}/test- wasm/go_js_wasm_exec" >> $GITHUB_ENV
141
+ run : echo "GO_JS_WASM_EXEC=${GOROOT}/misc/ wasm/go_js_wasm_exec" >> $GITHUB_ENV
123
142
124
143
- name : Insall NPM modules
125
144
run : yarn install
126
145
127
146
- name : Run Tests
128
147
run : |
148
+ if [ -f .github/.ci.conf ]; then . .github/.ci.conf; fi
129
149
GOOS=js GOARCH=wasm $GOPATH/bin/go test \
130
- -coverprofile=cover.out -covermode=atomic \
131
- -exec="${GO_JS_WASM_EXEC}" \
132
- -v ./...
150
+ -coverprofile=cover.out -covermode=atomic \
151
+ -exec="${GO_JS_WASM_EXEC}" \
152
+ -v ./...
133
153
134
- - uses : codecov/codecov-action@v1
154
+ - uses : codecov/codecov-action@v2
135
155
with :
136
156
file : ./cover.out
137
157
name : codecov-umbrella
0 commit comments