ci(docs-infra): increase wait for SW on localhost to avoid CI flakes (#29953)

The server used for testing on localhost has less optimizations (e.g.
serves uncompressed files), so we need to wait longer the ServiceWorker
to be loaded and registered to allow Lighthouse to reliably detect it,
especially on slower environments (e.g. CI).

Related: https://github.com/GoogleChrome/lighthouse/issues/5527#issuecomment-483710849

Fixes #29910

PR Close #29953
This commit is contained in:
George Kalpakas
2019-04-17 09:36:50 +03:00
committed by Ben Lesh
parent ca9b3eed9e
commit 60e9d2da4f
2 changed files with 20 additions and 13 deletions

View File

@ -249,10 +249,7 @@ jobs:
- run: yarn --cwd aio lint
# Run PWA-score tests
# (Run before unit and e2e tests, which destroy the `dist/` directory.)
# Temporarily lowering the min required PWA score to avoid flakes on CI.
# TODO(gkalpak): Re-enable once https://github.com/angular/angular/issues/29910 is resolved.
# - run: yarn --cwd aio test-pwa-score-localhost $CI_AIO_MIN_PWA_SCORE
- run: yarn --cwd aio test-pwa-score-localhost 70
- run: yarn --cwd aio test-pwa-score-localhost $CI_AIO_MIN_PWA_SCORE
# Check the bundle sizes.
# (Run before unit and e2e tests, which destroy the `dist/` directory.)
- run: yarn --cwd aio payload-size
@ -287,10 +284,7 @@ jobs:
- run: yarn --cwd aio build-local --progress=false
# Run PWA-score tests
# (Run before unit and e2e tests, which destroy the `dist/` directory.)
# Temporarily lowering the min required PWA score to avoid flakes on CI.
# TODO(gkalpak): Re-enable once https://github.com/angular/angular/issues/29910 is resolved.
# - run: yarn --cwd aio test-pwa-score-localhost $CI_AIO_MIN_PWA_SCORE
- run: yarn --cwd aio test-pwa-score-localhost 70
- run: yarn --cwd aio test-pwa-score-localhost $CI_AIO_MIN_PWA_SCORE
# Run unit tests
- run: yarn --cwd aio test --progress=false --watch=false
# Run e2e tests