@@ -27,25 +27,29 @@ CI must pass on your changes for them to be merged.
2727
2828### CI
2929
30- CI will ensure your code is formatted correctly, passes linting and tests.
30+ CI will ensure your code is formatted, lints and passes tests.
3131It will collect coverage and report it to [ codecov] ( https://codecov.io/gh/nhooyr/websocket )
32- and also upload a ` coverage ` artifact that you can download to inspect browse coverage.
32+ and also upload a html ` coverage ` artifact that you can download to browse coverage.
3333
34- You can run CI locally. The various steps are located in [ ci/ \* .sh ] ( ../ci ) .
34+ You can run CI locally. You only need [ Go ] ( https://golang.org ) , [ nodejs ] ( https://nodejs.org/en/ ) and [ yarn ] ( https://yarnpkg.com ) .
3535
36- 1 . [ fmt.sh] ( ../ci/fmt.sh ) which requires node (specifically prettier).
37- 1 . [ lint.sh] ( ../ci/lint.sh ) which requires [ shellcheck] ( https://github.com/koalaman/shellcheck#installing ) .
38- 1 . [ test.sh] ( ../ci/test.sh )
39- 1 . [ run.sh] ( ../ci/run.sh ) which runs the above scripts in order.
36+ See the scripts in [ package.json] ( ../package.json ) .
4037
41- For coverage details locally, see ` ci/out/coverage.html ` after running [ test.sh] ( ../ci/test.sh ) .
38+ 1 . ` yarn fmt ` performs code generation and formatting.
39+ 1 . ` yarn lint ` performs linting.
40+ 1 . ` yarn test ` runs tests.
41+ 1 . ` yarn all ` runs the above scripts in parallel.
42+
43+ For coverage details locally, see ` ci/out/coverage.html ` after running ` yarn test ` .
44+
45+ CI is written with nodejs to enable running as much as possible concurrently.
4246
4347See [ ci/image/Dockerfile] ( ../ci/image/Dockerfile ) for the installation of the CI dependencies on Ubuntu.
4448
45- You can also run tests normally with ` go test ` . [ test.sh ] ( ../ci/test.sh ) just passes a default set of flags to
46- ` go test ` to collect coverage and also prettify the output .
49+ You can also run tests normally with ` go test ` . ` yarn test` just passes a default set of flags to
50+ ` go test ` to collect coverage and runs the WASM tests .
4751
48- You can pass flags to [ test.sh ] ( ../ci/test.sh ) if you want to run a specific test or otherwise
52+ You can pass flags to ` yarn test` if you want to run a specific test or otherwise
4953control the behaviour of ` go test ` but also get coverage.
5054
5155Coverage percentage from codecov and the CI scripts will be different because they are calculated differently.
0 commit comments