New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
aio: add monitoring and fix a couple of issues #22483
Closed
Closed
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
b3a87fb
fix(aio): wait for the app to stabilize before registering the SW
gkalpak cc5ee5f
fixup! fix(aio): wait for the app to stabilize before registering the SW
gkalpak cdc2e09
refactor(aio): move deployment config tests and helpers around
gkalpak a353b4b
fixup! refactor(aio): move deployment config tests and helpers around
gkalpak 2fc4428
fix(aio): fix SW routing RegExp to allow redirecting `/api/animate` URLs
gkalpak 873284c
fixup! fix(aio): fix SW routing RegExp to allow redirecting `/api/ani…
gkalpak 014ce82
ci(aio): add monitoring for angular.io
gkalpak dc97fd6
fixup! ci(aio): add monitoring for angular.io
gkalpak b403663
fixup! ci(aio): add monitoring for angular.io
gkalpak a3000e2
fixup! fix(aio): wait for the app to stabilize before registering the SW
gkalpak File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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!" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
// Protractor configuration file, see link for more information | ||
// https://github.com/angular/protractor/blob/master/lib/config.ts | ||
|
||
exports.config = { | ||
allScriptsTimeout: 11000, | ||
specs: [ | ||
'./*.e2e-spec.ts' | ||
], | ||
capabilities: { | ||
browserName: 'chrome', | ||
// For Travis | ||
chromeOptions: { | ||
binary: process.env.CHROME_BIN, | ||
args: ['--no-sandbox'] | ||
} | ||
}, | ||
directConnect: true, | ||
framework: 'jasmine', | ||
jasmineNodeOpts: { | ||
showColors: true, | ||
defaultTimeoutInterval: 30000, | ||
print: function() {} | ||
}, | ||
params: { | ||
sitemapUrls: [], | ||
legacyUrls: [], | ||
}, | ||
beforeLaunch() { | ||
const {register} = require('ts-node'); | ||
register({}); | ||
}, | ||
onPrepare() { | ||
const {SpecReporter} = require('jasmine-spec-reporter'); | ||
const {browser} = require('protractor'); | ||
const {loadLegacyUrls, loadRemoteSitemapUrls} = require('../shared/helpers'); | ||
|
||
return Promise.all([ | ||
browser.getProcessedConfig(), | ||
loadRemoteSitemapUrls(browser.baseUrl), | ||
loadLegacyUrls(), | ||
]).then(([config, sitemapUrls, legacyUrls]) => { | ||
if (sitemapUrls.length <= 100) { | ||
throw new Error(`Too few sitemap URLs. (Expected: >100 | Found: ${sitemapUrls.length})`); | ||
} else if (legacyUrls.length <= 100) { | ||
throw new Error(`Too few legacy URLs. (Expected: >100 | Found: ${legacyUrls.length})`); | ||
} | ||
|
||
Object.assign(config.params, {sitemapUrls, legacyUrls}); | ||
jasmine.getEnv().addReporter(new SpecReporter({spec: {displayStacktrace: true}})); | ||
}); | ||
} | ||
}; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AFAICT renaming
~update-webdriver
toupdate-webdriver
is the only real change in this file, right? Or am I missing something?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pretty much 😇