File tree Expand file tree Collapse file tree 5 files changed +52
-11
lines changed
Expand file tree Collapse file tree 5 files changed +52
-11
lines changed Original file line number Diff line number Diff line change @@ -288,8 +288,11 @@ jobs:
288288 - name : Build standalone release
289289 run : source scl_source enable devtoolset-9 && yarn release:standalone
290290
291- - name : Sanity test standalone release
292- run : yarn test:standalone-release
291+ - name : Install test dependencies
292+ run : yarn install --ignore-scripts && cd test && yarn install
293+
294+ - name : Run integration tests on standalone release
295+ run : yarn test:integration
293296
294297 - name : Build packages with nfpm
295298 run : yarn package
@@ -421,8 +424,11 @@ jobs:
421424 - name : Build standalone release
422425 run : yarn release:standalone
423426
424- - name : Sanity test standalone release
425- run : yarn test:standalone-release
427+ - name : Install test dependencies
428+ run : yarn install --ignore-scripts && cd test && yarn install
429+
430+ - name : Run integration tests on standalone release
431+ run : yarn test:integration
426432
427433 - name : Build packages with nfpm
428434 run : yarn package
Original file line number Diff line number Diff line change 3434 run : ./install.sh
3535
3636 - name : Test code-server
37- run : yarn test:standalone-release code-server
37+ run : CODE_SERVER_PATH="code-server" yarn test:integration
3838
3939 alpine :
4040 name : Test installer on Alpine
6666 run : ./install.sh
6767
6868 - name : Test code-server
69- run : yarn test:standalone-release code-server
69+ run : CODE_SERVER_PATH="code-server" yarn test:integration
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ set -euo pipefail
3+
4+ help () {
5+ echo >&2 " You can build the standalone release with 'yarn release:standalone'"
6+ echo >&2 " Or you can pass in a custom path."
7+ echo >&2 " CODE_SERVER_PATH='/var/tmp/coder/code-server/bin/code-server' yarn test:integration"
8+ }
9+
10+ # Make sure a code-server release works. You can pass in the path otherwise it
11+ # will look for release-standalone in the current directory.
12+ #
13+ # This is to make sure we don't have Node version errors or any other
14+ # compilation-related errors.
15+ main () {
16+ cd " $( dirname " $0 " ) /../.."
17+
18+ local path=" ./release-standalone/bin/code-server"
19+ if [[ ! ${CODE_SERVER_PATH-} ]]; then
20+ echo " Set CODE_SERVER_PATH to test another build of code-server"
21+ else
22+ path=" $CODE_SERVER_PATH "
23+ fi
24+
25+ echo " Running tests with code-server binary: '$path '"
26+
27+ if [[ ! -f $path ]]; then
28+ echo >&2 " No code-server build detected"
29+ echo >&2 " Looked in $path "
30+ help
31+ exit 1
32+ fi
33+
34+ CODE_SERVER_PATH=" $path " CS_DISABLE_PLUGINS=true ./test/node_modules/.bin/jest " $@ " --coverage=false --testRegex " ./test/integration"
35+ }
36+
37+ main " $@ "
Original file line number Diff line number Diff line change @@ -147,7 +147,7 @@ Build the release packages (make sure that you run `yarn release` first):
147147
148148``` shell
149149yarn release:standalone
150- yarn test:standalone-release
150+ yarn test:integration
151151yarn package
152152```
153153
@@ -188,9 +188,7 @@ We use these to test anything related to our scripts (most of which live under `
188188
189189### Integration tests
190190
191- These are a work in progress. We build code-server and run a script called
192- [ test-standalone-release.sh] ( ../ci/build/test-standalone-release.sh ) , which
193- ensures that code-server's CLI is working.
191+ These are a work in progress. We build code-server and run tests with ` yarn test:integration ` , which ensures that code-server's binary works.
194192
195193Our integration tests look at components that rely on one another. For example,
196194testing the CLI requires us to build and package code-server.
Original file line number Diff line number Diff line change 1818 "release:github-assets" : " ./ci/build/release-github-assets.sh" ,
1919 "release:prep" : " ./ci/build/release-prep.sh" ,
2020 "test:e2e" : " VSCODE_IPC_HOOK_CLI= ./ci/dev/test-e2e.sh" ,
21- "test:standalone-release" : " ./ci/build/test-standalone-release.sh" ,
2221 "test:unit" : " ./ci/dev/test-unit.sh --forceExit --detectOpenHandles" ,
22+ "test:integration" : " ./ci/dev/test-integration.sh" ,
2323 "test:scripts" : " ./ci/dev/test-scripts.sh" ,
2424 "package" : " ./ci/build/build-packages.sh" ,
2525 "postinstall" : " ./ci/dev/postinstall.sh" ,
You can’t perform that action at this time.
0 commit comments