mirror of https://git.tuxpa.in/a/code-server.git
Add build test
This commit is contained in:
parent
511c3e95b2
commit
5bac2cbdb8
|
@ -9,12 +9,12 @@ jobs:
|
|||
- name: Linux Release
|
||||
if: tag IS present
|
||||
script:
|
||||
- travis_wait 60 ./ci/image/run.sh "yarn && yarn vscode && ci/release.sh"
|
||||
- travis_wait 60 ./ci/image/run.sh "yarn && yarn vscode && ci/release.sh && ./ci/build-test.sh"
|
||||
- ./ci/release-image/push.sh
|
||||
- name: Linux ARM64 Release
|
||||
if: tag IS present
|
||||
script:
|
||||
- ./ci/image/run.sh "yarn && yarn vscode && ci/release.sh"
|
||||
- ./ci/image/run.sh "yarn && yarn vscode && ci/release.sh && ./ci/build-test.sh"
|
||||
- ./ci/release-image/push.sh
|
||||
arch: arm64
|
||||
- name: MacOS Release
|
||||
|
@ -22,7 +22,7 @@ jobs:
|
|||
os: osx
|
||||
language: node_js
|
||||
node_js: 12
|
||||
script: yarn && yarn vscode && travis_wait 60 ci/release.sh
|
||||
script: yarn && yarn vscode && travis_wait 60 ci/release.sh && ./ci/build-test.sh
|
||||
|
||||
before_deploy:
|
||||
- echo "$JSON_KEY" | base64 --decode > ./ci/key.json
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
#!/usr/bin/env bash
|
||||
# build-test.bash -- Make sure the build worked.
|
||||
# This is to make sure we don't have Node version errors or any other
|
||||
# compilation-related errors.
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
function main() {
|
||||
cd "$(dirname "${0}")/.." || exit 1
|
||||
|
||||
local output
|
||||
output=$(node ./build/out/node/entry.js --list-extensions 2>&1)
|
||||
if echo "$output" | grep 'was compiled against a different Node.js version'; then
|
||||
echo "$output"
|
||||
exit 1
|
||||
else
|
||||
echo "Build ran successfully"
|
||||
fi
|
||||
}
|
||||
|
||||
main "$@"
|
Loading…
Reference in New Issue