Add linting steps and improve testing steps
This commit is contained in:
@ -46,7 +46,18 @@ main() {
|
||||
|
||||
# The action is determined by the name of the step.
|
||||
case $DRONE_STEP_NAME in
|
||||
*restore*) restore "$branch" "$DRONE_REPO_BRANCH" ;;
|
||||
*restore*)
|
||||
# Sub-modules must be pulled first since extracting the cache directories
|
||||
# will prevent git from cloning into them.
|
||||
git submodule update --init
|
||||
|
||||
restore "$branch" "$DRONE_REPO_BRANCH"
|
||||
|
||||
# Now make sure the pulled Node modules are up to date.
|
||||
YARN_CACHE_FOLDER="$(pwd)/yarn-cache"
|
||||
export YARN_CACHE_FOLDER
|
||||
yarn
|
||||
;;
|
||||
*rebuild*|*package*) package "$branch" ;;
|
||||
*) exit 1 ;;
|
||||
esac
|
||||
|
@ -3,6 +3,7 @@
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
# This script assumes that yarn has already ran.
|
||||
function main() {
|
||||
cd "$(dirname "${0}")/.."
|
||||
|
||||
@ -21,10 +22,6 @@ function main() {
|
||||
export PACKAGE="true"
|
||||
fi
|
||||
|
||||
if [[ -z ${SKIP_YARN:-} ]] ; then
|
||||
yarn
|
||||
fi
|
||||
|
||||
yarn build
|
||||
yarn binary
|
||||
if [[ -n ${PACKAGE:-} ]] ; then
|
||||
|
19
scripts/test.sh
Executable file
19
scripts/test.sh
Executable file
@ -0,0 +1,19 @@
|
||||
#!/usr/bin/env sh
|
||||
# test.sh -- Simple build test.
|
||||
|
||||
set -eu
|
||||
|
||||
main() {
|
||||
cd "$(dirname "$0")/.."
|
||||
|
||||
# The main goal here is to ensure that the build fully completed and the
|
||||
# result looks usable.
|
||||
version=$(node ./build/out/node/entry.js --version --json)
|
||||
echo "Got '$version' for the version"
|
||||
case $version in
|
||||
"{ codeServer":*) exit 0 ;;
|
||||
*) exit 1 ;;
|
||||
esac
|
||||
}
|
||||
|
||||
main "$@"
|
Reference in New Issue
Block a user