mirror of
https://github.com/coder/code-server.git
synced 2025-07-24 18:34:27 +08:00

* Update Code to 1.94.2 * Convert from yarn to npm This is to match VS Code. We were already partially using npm for the releases so this is some nice alignment. * Update caniuse-lite This was complaining on every unit test. * Update eslint I was having a bunch of dependency conflicts and eslint seemed to be the culprit so I just removed it and set it up again, since it seems things have changed quite a bit. * Update test dependencies I was getting oom when running the unit tests...updating seems to work. * Remove package.json `scripts` property in release The new pre-install script was being included, which is dev-only. This was always the intent; did not realize jq's merge was recursive. * Remove jest and devDependencies in release as well * Update test extension dependencies This appears to be conflicting with the root dependencies. * Fix playwright exec npm does not let you run binaries like yarn does, as far as I know. * Fix import of server-main.js * Fix several tests by waiting for selectors
40 lines
1.1 KiB
Bash
Executable File
40 lines
1.1 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
help() {
|
|
echo >&2 " You can build the standalone release with 'npm run release:standalone'"
|
|
echo >&2 " Or you can pass in a custom path."
|
|
echo >&2 " CODE_SERVER_PATH='/var/tmp/coder/code-server/bin/code-server' npm run test:integration"
|
|
}
|
|
|
|
# Make sure a code-server release works. You can pass in the path otherwise it
|
|
# will look for release-standalone in the current directory.
|
|
#
|
|
# This is to make sure we don't have Node version errors or any other
|
|
# compilation-related errors.
|
|
main() {
|
|
cd "$(dirname "$0")/../.."
|
|
|
|
source ./ci/lib.sh
|
|
|
|
local path="$RELEASE_PATH-standalone/bin/code-server"
|
|
if [[ ! ${CODE_SERVER_PATH-} ]]; then
|
|
echo "Set CODE_SERVER_PATH to test another build of code-server"
|
|
else
|
|
path="$CODE_SERVER_PATH"
|
|
fi
|
|
|
|
echo "Running tests with code-server binary: '$path'"
|
|
|
|
if [[ ! -f $path ]]; then
|
|
echo >&2 "No code-server build detected"
|
|
echo >&2 "Looked in $path"
|
|
help
|
|
exit 1
|
|
fi
|
|
|
|
CODE_SERVER_PATH="$path" ./test/node_modules/.bin/jest "$@" --coverage=false --testRegex "./test/integration/help.test.ts"
|
|
}
|
|
|
|
main "$@"
|