ci(aio): add monitoring for angular.io (#22483)
This commit configures a periodic job to be run on CircleCI, performing several checks against the actual apps deployed to production (https://angular.io) and staging (https://next.angular.io). Fixes #21942 PR Close #22483
This commit is contained in:

committed by
Alex Rickabaugh

parent
a9e05ac82f
commit
6cb1adf105
38
aio/scripts/test-production.sh
Normal file
38
aio/scripts/test-production.sh
Normal file
@ -0,0 +1,38 @@
|
||||
#!/usr/bin/env bash
|
||||
set +x -eu -o pipefail
|
||||
|
||||
(
|
||||
readonly thisDir="$(cd $(dirname ${BASH_SOURCE[0]}); pwd)"
|
||||
readonly aioDir="$(realpath $thisDir/..)"
|
||||
|
||||
readonly appPtorConf="$aioDir/tests/e2e/protractor.conf.js"
|
||||
readonly cfgPtorConf="$aioDir/tests/deployment-config/e2e/protractor.conf.js"
|
||||
readonly minPwaScore="95"
|
||||
readonly urls=(
|
||||
"https://angular.io/"
|
||||
"https://next.angular.io"
|
||||
)
|
||||
|
||||
cd "$aioDir"
|
||||
|
||||
# Install dependencies.
|
||||
echo -e "\nInstalling dependencies in '$aioDir'...\n-----"
|
||||
yarn install --frozen-lockfile
|
||||
yarn update-webdriver
|
||||
|
||||
# Run checks for all URLs.
|
||||
for url in "${urls[@]}"; do
|
||||
echo -e "\nChecking '$url'...\n-----"
|
||||
|
||||
# Run e2e tests.
|
||||
yarn protractor "$appPtorConf" --baseUrl "$url"
|
||||
|
||||
# Run deployment config tests.
|
||||
yarn protractor "$cfgPtorConf" --baseUrl "$url"
|
||||
|
||||
# Run PWA-score tests.
|
||||
yarn test-pwa-score "$url" "$minPwaScore"
|
||||
done
|
||||
|
||||
echo -e "\nAll checks passed!"
|
||||
)
|
Reference in New Issue
Block a user