File tree Expand file tree Collapse file tree 5 files changed +32
-31
lines changed Expand file tree Collapse file tree 5 files changed +32
-31
lines changed Original file line number Diff line number Diff line change 7
7
- checkout
8
8
- restore_cache :
9
9
keys :
10
- - go-v1 -{{ checksum "go.sum" }}
10
+ - go-v3 -{{ checksum "go.sum" }}
11
11
# Fallback to using the latest cache if no exact match is found.
12
- - go-v1 -
12
+ - go-v3 -
13
13
- run : ./ci/fmt.sh
14
14
- save_cache :
15
15
paths :
16
- - /root/go
16
+ - /root/gopath
17
17
- /root/.cache/go-build
18
- key : go-v1 -{{ checksum "go.sum" }}
18
+ key : go-v3 -{{ checksum "go.sum" }}
19
19
20
20
lint :
21
21
docker :
@@ -24,15 +24,15 @@ jobs:
24
24
- checkout
25
25
- restore_cache :
26
26
keys :
27
- - go-v1 -{{ checksum "go.sum" }}
27
+ - go-v3 -{{ checksum "go.sum" }}
28
28
# Fallback to using the latest cache if no exact match is found.
29
- - go-v1 -
29
+ - go-v3 -
30
30
- run : ./ci/lint.sh
31
31
- save_cache :
32
32
paths :
33
- - /root/go
33
+ - /root/gopath
34
34
- /root/.cache/go-build
35
- key : go-v1 -{{ checksum "go.sum" }}
35
+ key : go-v3 -{{ checksum "go.sum" }}
36
36
37
37
test :
38
38
docker :
@@ -41,18 +41,18 @@ jobs:
41
41
- checkout
42
42
- restore_cache :
43
43
keys :
44
- - go-v1 -{{ checksum "go.sum" }}
44
+ - go-v3 -{{ checksum "go.sum" }}
45
45
# Fallback to using the latest cache if no exact match is found.
46
- - go-v1 -
46
+ - go-v3 -
47
47
- run : ./ci/test.sh
48
48
- store_artifacts :
49
49
path : ci/out
50
50
destination : out
51
51
- save_cache :
52
52
paths :
53
- - /root/go
53
+ - /root/gopath
54
54
- /root/.cache/go-build
55
- key : go-v1 -{{ checksum "go.sum" }}
55
+ key : go-v3 -{{ checksum "go.sum" }}
56
56
- store_test_results :
57
57
path : ci/out
58
58
@@ -63,18 +63,20 @@ jobs:
63
63
- checkout
64
64
- restore_cache :
65
65
keys :
66
- - go-v1 -{{ checksum "go.sum" }}
66
+ - go-v3 -{{ checksum "go.sum" }}
67
67
# Fallback to using the latest cache if no exact match is found.
68
- - go-v1 -
68
+ - go-v3 -
69
69
- run : ./ci/bench.sh
70
70
- store_artifacts :
71
71
path : ci/out
72
72
destination : out
73
73
- save_cache :
74
74
paths :
75
- - /root/go
75
+ - /root/gopath
76
76
- /root/.cache/go-build
77
- key : go-v1-{{ checksum "go.sum" }}
77
+ key : go-v3-{{ checksum "go.sum" }}
78
+ - store_test_results :
79
+ path : ci/out
78
80
79
81
workflows :
80
82
version : 2
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ set -euo pipefail
4
4
cd " $( dirname " ${0} " ) "
5
5
cd " $( git rev-parse --show-toplevel) "
6
6
7
- mkdir -p ci/out
7
+ mkdir -p ci/out/gobench
8
8
benchArgs=(
9
9
" -vet=off"
10
10
" -run=^$"
@@ -20,7 +20,7 @@ benchArgs=(
20
20
if [[ ${CI-} ]]; then
21
21
# https://circleci.com/docs/2.0/collect-test-data/
22
22
go test " ${benchArgs[@]} " | tee /dev/stderr |
23
- go run github.com/jstemmer/go-junit-report > ci/out/testReport .xml
23
+ go run github.com/jstemmer/go-junit-report > ci/out/gobench/report .xml
24
24
else
25
25
go test " ${benchArgs[@]} "
26
26
fi
Original file line number Diff line number Diff line change 1
- FROM archlinux/base
1
+ FROM golang:1
2
2
3
- RUN pacman -Syu --noconfirm
3
+ ENV DEBIAN_FRONTEND=noninteractive
4
+ ENV GOPATH /root/gopath
5
+ ENV GOFLAGS -mod=readonly
4
6
5
- RUN pacman -S --noconfirm go git shellcheck tar openssh gzip ca-certificates
6
-
7
- RUN pacman -S --noconfirm gcc python2-pip && \
8
- pip2 install autobahntestsuite
9
-
10
- RUN pacman -S --noconfirm npm && \
7
+ RUN apt-get update && \
8
+ apt-get install -y shellcheck python-pip npm && \
9
+ pip2 install autobahntestsuite && \
11
10
npm install -g prettier
12
11
13
- ENV GOFLAGS -mod=readonly
Original file line number Diff line number Diff line change 2
2
3
3
set -euo pipefail
4
4
cd " $( dirname " ${0} " ) "
5
+ cd " $( git rev-parse --show-toplevel) "
5
6
6
- docker build -t nhooyr/websocket-ci .
7
+ docker build -f ./ci/image/Dockerfile - t nhooyr/websocket-ci .
7
8
docker push nhooyr/websocket-ci
Original file line number Diff line number Diff line change @@ -4,17 +4,17 @@ set -euo pipefail
4
4
cd " $( dirname " ${0} " ) "
5
5
cd " $( git rev-parse --show-toplevel) "
6
6
7
- mkdir -p ci/out
7
+ mkdir -p ci/out/gotest
8
8
testFlags=(-race " -vet=off" " -coverprofile=ci/out/coverage.prof" " -coverpkg=./..." )
9
9
if [[ ${CI-} ]]; then
10
10
# https://circleci.com/docs/2.0/collect-test-data/
11
11
go test " ${testFlags[@]} " -v ./... 2>&1 | tee /dev/stderr |
12
- go run github.com/jstemmer/go-junit-report > ci/out/testReport .xml
12
+ go run github.com/jstemmer/go-junit-report > ci/out/gotest/report .xml
13
13
else
14
14
go test " ${testFlags[@]} " ./...
15
15
fi
16
- go tool cover -html=ci/out/coverage.prof -o=ci/out/coverage.html
17
16
17
+ go tool cover -html=ci/out/coverage.prof -o=ci/out/coverage.html
18
18
if [[ ${CI:- } ]]; then
19
19
bash <( curl -s https://codecov.io/bash) -f ci/out/coverage.prof
20
20
fi
You can’t perform that action at this time.
0 commit comments