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+
112name : Test
213on :
314 push :
@@ -11,11 +22,11 @@ jobs:
1122 runs-on : ubuntu-latest
1223 strategy :
1324 matrix :
14- go : ["1.15 ", "1.16 "]
25+ go : ["1.16 ", "1.17 "]
1526 fail-fast : false
1627 name : Go ${{ matrix.go }}
1728 steps :
18- - uses : actions/checkout@v2
29+ - uses : actions/checkout@v3
1930
2031 - uses : actions/cache@v2
2132 with :
2839 ${{ runner.os }}-amd64-go-
2940
3041 - name : Setup Go
31- uses : actions/setup-go@v2
42+ uses : actions/setup-go@v3
3243 with :
3344 go-version : ${{ matrix.go }}
3445
@@ -39,11 +50,19 @@ jobs:
3950
4051 - name : Run test
4152 run : |
53+ TEST_BENCH_OPTION="-bench=."
54+ if [ -f .github/.ci.conf ]; then . .github/.ci.conf; fi
55+
4256 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
4564
46- - uses : codecov/codecov-action@v1
65+ - uses : codecov/codecov-action@v2
4766 with :
4867 file : ./cover.out
4968 name : codecov-umbrella
@@ -54,11 +73,11 @@ jobs:
5473 runs-on : ubuntu-latest
5574 strategy :
5675 matrix :
57- go : ["1.15 ", "1.16 "]
76+ go : ["1.16 ", "1.17 "]
5877 fail-fast : false
5978 name : Go i386 ${{ matrix.go }}
6079 steps :
61- - uses : actions/checkout@v2
80+ - uses : actions/checkout@v3
6281
6382 - uses : actions/cache@v2
6483 with :
@@ -73,30 +92,30 @@ jobs:
7392 run : |
7493 mkdir -p $HOME/go/pkg/mod $HOME/.cache
7594 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 ./...
87106
88107 test-wasm :
89108 runs-on : ubuntu-latest
90109 strategy :
91110 fail-fast : false
92111 name : WASM
93112 steps :
94- - uses : actions/checkout@v2
113+ - uses : actions/checkout@v3
95114
96115 - name : Use Node.js
97- uses : actions/setup-node@v2
116+ uses : actions/setup-node@v3
98117 with :
99- node-version : ' 12 .x'
118+ node-version : ' 16 .x'
100119
101120 - uses : actions/cache@v2
102121 with :
@@ -110,7 +129,7 @@ jobs:
110129 - name : Download Go
111130 run : curl -sSfL https://dl.google.com/go/go${GO_VERSION}.linux-amd64.tar.gz | tar -C ~ -xzf -
112131 env :
113- GO_VERSION : 1.16
132+ GO_VERSION : 1.17
114133
115134 - name : Set Go Root
116135 run : echo "GOROOT=${HOME}/go" >> $GITHUB_ENV
@@ -119,19 +138,20 @@ jobs:
119138 run : echo "GOPATH=${HOME}/go" >> $GITHUB_ENV
120139
121140 - 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
123142
124143 - name : Insall NPM modules
125144 run : yarn install
126145
127146 - name : Run Tests
128147 run : |
148+ if [ -f .github/.ci.conf ]; then . .github/.ci.conf; fi
129149 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 ./...
133153
134- - uses : codecov/codecov-action@v1
154+ - uses : codecov/codecov-action@v2
135155 with :
136156 file : ./cover.out
137157 name : codecov-umbrella
0 commit comments