mirror of
https://github.com/danog/code-server.git
synced 2024-11-26 20:34:56 +01:00
51677f0819
* refactor: remove stylelint * refactor: move shellcheck to separate job * refactor: add helm script and job * refactor: add eslint job and yarn script * fix(test/tsconfig): exclude test-plugin * refactor: delete lint, add typecheck job * refactor: remove prebuild * wip: add notes about unit test refactor * refactor: delete buggy socket test This test was really added to in get cover specific lines but it's buggy and only passes sometimes locally. I think it's okay to remove because: - it's an implementation detail (not user facing) - not preventing any specific regressions * refactor: move test-plugin to integration suite This seems more appropriate given this tests how a plugin might work within code-server. * wip * wip: refactor vscode integration tests * refactor: move unit tests to separate job * fix: formatting * Revert "wip: refactor vscode integration tests" This reverts commit 13286bf4c9762b7d6c6176464d94b1fc316fb568. * Revert "refactor: move unit tests to separate job" This reverts commit 6c87b540b49c8d56266c8925c4fd32ed760b23bf. * feat: collect codecov integration tests * fixup! feat: collect codecov integration tests * fixup! feat: collect codecov integration tests * fixup!: move helm step * fixup!: update ids for caching * trigger ci * trigger ci * chore: clean up names in security.yaml * fixup!: remove .tsx * fixup!: change to src/**" * fixup!: move helm cmd to yaml * fixup!: always build test plugin * fixup!: fix plugin typings * fixup! add back flakey test * fixup!: only install helm deps if changes * fixup!: revert node mod caching * dont keep, test for asher * fixup!: add make to centos * refactor: add test:native This adds a new script to run native tests (i.e. --help which should run in ci on all platforms). * try updating glibc * try 2.25 * Revert "refactor: move test-plugin to integration suite" This reverts commit bc02005dc097a10b5216b616ff0bd7a911240748. I couldn't get past some GLIBC errors in CI so moving back to unit tests. * Revert "try updating glibc" This reverts commit 02ed560f223a8505cb5e6e2014055cb256a407b0. * fixup! * asher: again * try this for ts changes * fixup * refactor: scripts.yml -> scripts.yaml * fixup!: move lint-sh to scripts.yaml * fixup!: use apk for lint scripts * fixup! fixup!: use apk for lint scripts * fixup!: remove typecheck step * fix: pattern for lint ts files * test: lint should fail * fixup! fixup!: use apk for lint scripts * Revert "test: lint should fail" This reverts commit 158c64db044c24f2f8ffd082cc769f06876d6957. * fixup!: skip cancel workflow on forks Looks like the cancel action workflow can't run on forks due to secrets. See https://github.com/andymckay/cancel-action/issues/4 * fixup: remove cancel-workflow * fixup! fixup! fixup!: use apk for lint scripts * fixup! fixup! fixup!: use apk for lint scripts * fixup!: fix yarn key * fixup!: add fetch-depth 0
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 'yarn 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' yarn 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 "$@"
|