1
1
# CircleCI configuration for GopherJS.
2
- #
2
+ #
3
3
# This configuration has one build_and_test workflow designed to run on all commits
4
4
# and pull requests. It consists of three jobs:
5
- #
5
+ #
6
6
# - build: Builds and runs GopherJS unit tests, as well as lits, smoke tests, etc.
7
7
# This job is designed to provide quickest feedback on the most important
8
8
# functionality. It should not include anything heavyweight and should be kept
9
9
# under 2-3 minutes of runtime.
10
- #
10
+ #
11
11
# - gopherjs_tests: Runs standard library and GopherJS package tests using GopherJS
12
12
# *itself*. This is the most comprehensive test suite we have and it is sharded
13
13
# into 4 parallel instances for faster execution.
14
- #
14
+ #
15
15
# - gorepo_tests: Runs language tests from the Go compiler test suite. The objective
16
16
# of these tests is to ensure conformance of GopherJS to the upstream Go to the
17
17
# highest degree possible, considering differences in the runtime.
18
- #
18
+ #
19
19
# If all tests passed, it is reasonably to assume that the version is more or less
20
20
# bug-free (although as of summer 2021 our test coverage is not ideal).
21
- #
21
+ #
22
22
# For convenience of upgrades, NVM, Node.js and Go versions are specified as
23
23
# parameters at the top of the config. Increasing the version and ensuring that the
24
24
# workflow passes is sufficient to verify GopherJS compatibility with that version.
25
- #
25
+ #
26
26
# Versions of Node modules GopherJS depends on are specified in package.json and can
27
27
# be changed there (remember to run `npm install` to update the lock file).
28
28
@@ -39,16 +39,16 @@ workflows:
39
39
jobs :
40
40
- build
41
41
- gopherjs_tests :
42
- requires :
42
+ requires :
43
43
- build
44
44
- gorepo_tests :
45
- requires :
45
+ requires :
46
46
- build
47
47
48
48
parameters :
49
49
go_version :
50
50
type : string
51
- default : " 1.16.5 "
51
+ default : " 1.16.7 "
52
52
nvm_version :
53
53
type : string
54
54
default : " 0.38.0"
@@ -70,14 +70,14 @@ jobs:
70
70
- run :
71
71
name : Check gofmt
72
72
command : diff -u <(echo -n) <(gofmt -d .)
73
- - run :
73
+ - run :
74
74
name : Check go vet
75
75
command : |
76
- set -e
76
+ set -e
77
77
# Go package in root directory.
78
- go vet .
78
+ go vet .
79
79
# All subdirectories except "doc", "tests", "node*".
80
- for d in */; do echo ./$d...; done | grep -v ./doc | grep -v ./tests | grep -v ./node | xargs go vet
80
+ for d in */; do echo ./$d...; done | grep -v ./doc | grep -v ./tests | grep -v ./node | xargs go vet
81
81
- run :
82
82
name : Check natives build tags
83
83
command : diff -u <(echo -n) <(go list ./compiler/natives/src/...) # All those packages should have // +build js.
@@ -113,7 +113,7 @@ jobs:
113
113
- run :
114
114
name : TodoMVC in Go Modules mode
115
115
command : |
116
- set -e
116
+ set -e
117
117
export GO111MODULE=on
118
118
export GOPATH=/tmp/gomod
119
119
mkdir -p $GOPATH/src
@@ -126,7 +126,7 @@ jobs:
126
126
- run :
127
127
name : Compare GOPATH and Go Modules output
128
128
command : diff -u <(sed 's/todomvc_gomod.js.map/todomvc_ignored.js.map/' /tmp/todomvc_gomod.js) <(sed 's/todomvc_gopath.js.map/todomvc_ignored.js.map/' /tmp/todomvc_gopath.js)
129
-
129
+
130
130
gopherjs_tests :
131
131
executor : gopherjs
132
132
parallelism : 4
@@ -148,8 +148,9 @@ jobs:
148
148
set -e
149
149
# Convert test output into junit format for CircleCI.
150
150
mkdir -p ~/test-reports/
151
- go-junit-report --full-class-name < /tmp/test-gopherjs.txt > ~/test-reports/gopherjs.xml
151
+ go-junit-report --full-class-name < /tmp/test-gopherjs.txt > ~/test-reports/gopherjs-${CIRCLE_NODE_INDEX} .xml
152
152
exit "$status"
153
+ no_output_timeout : " 1h" # Packages like math/big take a while to run all tests.
153
154
- store_test_results :
154
155
path : ~/test-reports/
155
156
@@ -203,7 +204,7 @@ commands:
203
204
echo 'export SOURCE_MAP_SUPPORT=true' >> $BASH_ENV
204
205
# Make nodejs able to require installed modules from any working path.
205
206
echo export "NODE_PATH='$(npm root)'" >> "${BASH_ENV}"
206
- - run :
207
+ - run :
207
208
name : Install required Go packages
208
209
command : go mod download -x
209
210
install_gopherjs :
0 commit comments