angular-cn/aio/scripts/test-production.sh
George Kalpakas 582ef2e7b4 ci(docs-infra): split the aio_monitoring CircleCI job into two jobs (#30110)
Previously, the `aio_monitoring` job was testing both the stable
(https://angular.io/) and the @next (https://next.angular.io/) versions.

This commit splits the tests into two separate jobs (still run as part
of the same workflow). This speeds up the tests (since the two jobs can
now run in parallel) and makes it easier to isolate failures (e.g.
identify which branch is failing, disable one of the two, etc.).
(Credits to @petebacondarwin 😉)

PR Close #30110
2019-04-26 16:33:45 -07:00

30 lines
758 B
Bash
Executable File

#!/usr/bin/env bash
set +x -eu -o pipefail
(
readonly thisDir="$(cd $(dirname ${BASH_SOURCE[0]}); pwd)"
readonly aioDir="$(realpath $thisDir/..)"
readonly protractorConf="$aioDir/tests/deployment/e2e/protractor.conf.js"
readonly targetUrl="$1"
readonly minPwaScore="$2"
cd "$aioDir"
# Install dependencies.
echo -e "\nInstalling dependencies in '$aioDir'...\n-----"
yarn install --frozen-lockfile --non-interactive
yarn update-webdriver
# Run checks for target URL.
echo -e "\nChecking '$targetUrl'...\n-----"
# Run basic e2e and deployment config tests.
yarn protractor "$protractorConf" --baseUrl "$targetUrl"
# Run PWA-score tests.
yarn test-pwa-score "$targetUrl" "$minPwaScore"
echo -e "\nAll checks passed!"
)