Archived
1
0
This repository has been archived on 2024-09-09. You can view files and clone it, but cannot push or open issues or pull requests.
code-server/ci/dev/test-e2e.sh
Teffen Ellis f885b29675 Add vscode via vendor package.
- Use yarn for vscode vendoring.
- Grab hash from package.
2021-09-15 14:54:33 -04:00

39 lines
891 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
main() {
cd "$(dirname "$0")/../.."
source ./ci/lib.sh
local dir="$PWD"
if [[ ! ${CODE_SERVER_TEST_ENTRY-} ]]; then
echo "Set CODE_SERVER_TEST_ENTRY to test another build of code-server"
else
pushd "$CODE_SERVER_TEST_ENTRY"
dir="$PWD"
popd
fi
echo "Testing build in '$dir'"
# Simple sanity checks to see that we've built. There could still be things
# wrong (native modules version issues, incomplete build, etc).
if [[ ! -d $dir/out ]]; then
echo >&2 "No code-server build detected"
echo >&2 "You can build it with 'yarn build' or 'yarn watch'"
exit 1
fi
if [[ ! -d $dir/vendor/modules/code-oss-dev/out ]]; then
echo >&2 "No VS Code build detected"
echo >&2 "You can build it with 'yarn build:vscode' or 'yarn watch'"
exit 1
fi
cd test
yarn playwright test "$@"
}
main "$@"