File tree 5 files changed +52
-11
lines changed
5 files changed +52
-11
lines changed Original file line number Diff line number Diff line change @@ -288,8 +288,11 @@ jobs:
288
288
- name : Build standalone release
289
289
run : source scl_source enable devtoolset-9 && yarn release:standalone
290
290
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
293
296
294
297
- name : Build packages with nfpm
295
298
run : yarn package
@@ -421,8 +424,11 @@ jobs:
421
424
- name : Build standalone release
422
425
run : yarn release:standalone
423
426
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
426
432
427
433
- name : Build packages with nfpm
428
434
run : yarn package
Original file line number Diff line number Diff line change 34
34
run : ./install.sh
35
35
36
36
- name : Test code-server
37
- run : yarn test:standalone-release code-server
37
+ run : CODE_SERVER_PATH="code-server" yarn test:integration
38
38
39
39
alpine :
40
40
name : Test installer on Alpine
66
66
run : ./install.sh
67
67
68
68
- 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):
147
147
148
148
``` shell
149
149
yarn release:standalone
150
- yarn test:standalone-release
150
+ yarn test:integration
151
151
yarn package
152
152
```
153
153
@@ -188,9 +188,7 @@ We use these to test anything related to our scripts (most of which live under `
188
188
189
189
### Integration tests
190
190
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.
194
192
195
193
Our integration tests look at components that rely on one another. For example,
196
194
testing the CLI requires us to build and package code-server.
Original file line number Diff line number Diff line change 18
18
"release:github-assets" : " ./ci/build/release-github-assets.sh" ,
19
19
"release:prep" : " ./ci/build/release-prep.sh" ,
20
20
"test:e2e" : " VSCODE_IPC_HOOK_CLI= ./ci/dev/test-e2e.sh" ,
21
- "test:standalone-release" : " ./ci/build/test-standalone-release.sh" ,
22
21
"test:unit" : " ./ci/dev/test-unit.sh --forceExit --detectOpenHandles" ,
22
+ "test:integration" : " ./ci/dev/test-integration.sh" ,
23
23
"test:scripts" : " ./ci/dev/test-scripts.sh" ,
24
24
"package" : " ./ci/build/build-packages.sh" ,
25
25
"postinstall" : " ./ci/dev/postinstall.sh" ,
You can’t perform that action at this time.
0 commit comments