File tree Expand file tree Collapse file tree 2 files changed +17
-10
lines changed
Expand file tree Collapse file tree 2 files changed +17
-10
lines changed Original file line number Diff line number Diff line change @@ -147,14 +147,7 @@ jobs:
147147 run : yarn build:vscode
148148
149149 # Our code imports code from VS Code's `out` directory meaning VS Code
150- # must be built before running these tests. It looks for `out` in order
151- # to work during development but production creates `out-build`,
152- # `out-vscode-server, and `out-vscode-server-min` so symlink to one of
153- # those (during release we move `out-vscode-server-min` to out so using
154- # that gives the closest environment to release).
155- - name : Link VS Code build
156- run : ln -s out-vscode-server-min vendor/modules/code-oss-dev/out
157-
150+ # must be built before running these tests.
158151 # TODO: Move to its own step?
159152 - name : Run code-server unit tests
160153 run : yarn test:unit
Original file line number Diff line number Diff line change @@ -3,12 +3,26 @@ set -euo pipefail
33
44main () {
55 cd " $( dirname " $0 " ) /../.."
6- cd test/unit/node/test-plugin
6+
7+ source ./ci/lib.sh
8+
9+ pushd test/unit/node/test-plugin
710 make -s out/index.js
11+ popd
12+
13+ # Our code imports from `out` in order to work during development but if you
14+ # have only built for production you will have not have this directory. In
15+ # that case symlink `out` to a production build directory.
16+ local vscode=" vendor/modules/code-oss-dev"
17+ local link=" $vscode /out"
18+ local target=" out-build"
19+ if [[ ! -e $link ]] && [[ -d $vscode /$target ]]; then
20+ ln -s " $target " " $link "
21+ fi
22+
823 # We must keep jest in a sub-directory. See ../../test/package.json for more
924 # information. We must also run it from the root otherwise coverage will not
1025 # include our source files.
11- cd " $OLDPWD "
1226 CS_DISABLE_PLUGINS=true ./test/node_modules/.bin/jest " $@ "
1327}
1428
You can’t perform that action at this time.
0 commit comments