mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
build(): First version of using SauceLabs and BrowserStack on travis.
This commit is contained in:
@@ -7,5 +7,51 @@ echo "======= Starting build-and-test.sh =====================================
|
||||
SCRIPT_DIR=$(dirname $0)
|
||||
cd ${SCRIPT_DIR}/../..
|
||||
|
||||
ng build
|
||||
karma start --single-run --no-auto-watch --reporters='dots'
|
||||
|
||||
start_tunnel() {
|
||||
case "$MODE" in
|
||||
saucelabs*)
|
||||
./scripts/sauce/sauce_connect_setup.sh
|
||||
;;
|
||||
browserstack*)
|
||||
./scripts/browserstack/start_tunnel.sh
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
wait_for_tunnel() {
|
||||
case "$MODE" in
|
||||
saucelabs*)
|
||||
./scripts/sauce/sauce_connect_block.sh
|
||||
;;
|
||||
browserstack*)
|
||||
./scripts/browserstack/waitfor_tunnel.sh
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
sleep 10
|
||||
}
|
||||
|
||||
teardown_tunnel() {
|
||||
case "$MODE" in
|
||||
saucelabs*)
|
||||
./scripts/sauce/sauce_connect_teardown.sh
|
||||
;;
|
||||
browserstack*)
|
||||
# ./scripts/browserstack/teardown_tunnel.sh
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
|
||||
start_tunnel
|
||||
wait_for_tunnel
|
||||
npm run build
|
||||
karma start test/karma.conf.js --single-run --no-auto-watch --reporters='dots'
|
||||
teardown_tunnel
|
||||
|
||||
|
||||
Reference in New Issue
Block a user