ci(docs-infra): run PWA score tests after unit/e2e tests (#31047)

Previously, we run the PWA score tests before unit/e2e tests, because
the latter would destroy the `dist/` directory required by the former.

Since cli@6, unit/e2e tests no longer detroy the `dist/` directory, so
it is now safe to run the unit/e2e tests first. This is preferrable,
since they are conceptually lower-level and any error messages (in case
of breakage) are more specific/actionable.

Related discussion about cli behavior:
- angular/angular-cli#4366
- angular/angular-cli#14701

PR Close #31047
This commit is contained in:
George Kalpakas 2019-06-14 00:25:35 +03:00 committed by Andrew Kushnir
parent 6fbfb5a159
commit a6cb20cbe7
1 changed files with 8 additions and 12 deletions

View File

@ -250,16 +250,14 @@ jobs:
- run: yarn --cwd aio build --progress=false - run: yarn --cwd aio build --progress=false
# Lint the code # Lint the code
- run: yarn --cwd aio lint - run: yarn --cwd aio lint
# Run PWA-score tests
# (Run before unit and e2e tests, which destroy the `dist/` directory.)
- 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
# Run unit tests # Run unit tests
- run: yarn --cwd aio test --progress=false --watch=false - run: yarn --cwd aio test --progress=false --watch=false
# Run e2e tests # Run e2e tests
- run: yarn --cwd aio e2e --configuration=ci - run: yarn --cwd aio e2e --configuration=ci
# Run PWA-score tests
- run: yarn --cwd aio test-pwa-score-localhost $CI_AIO_MIN_PWA_SCORE
# Check the bundle sizes.
- run: yarn --cwd aio payload-size
# Run unit tests for Firebase redirects # Run unit tests for Firebase redirects
- run: yarn --cwd aio redirects-test - run: yarn --cwd aio redirects-test
@ -285,13 +283,12 @@ jobs:
- *init_environment - *init_environment
# Build aio (with local Angular packages) # Build aio (with local Angular packages)
- run: yarn --cwd aio build-local --progress=false - run: yarn --cwd aio build-local --progress=false
# Run PWA-score tests
# (Run before unit and e2e tests, which destroy the `dist/` directory.)
- run: yarn --cwd aio test-pwa-score-localhost $CI_AIO_MIN_PWA_SCORE
# Run unit tests # Run unit tests
- run: yarn --cwd aio test --progress=false --watch=false - run: yarn --cwd aio test --progress=false --watch=false
# Run e2e tests # Run e2e tests
- run: yarn --cwd aio e2e --configuration=ci - run: yarn --cwd aio e2e --configuration=ci
# Run PWA-score tests
- run: yarn --cwd aio test-pwa-score-localhost $CI_AIO_MIN_PWA_SCORE
test_aio_local_ivy: test_aio_local_ivy:
<<: *job_defaults <<: *job_defaults
@ -303,13 +300,12 @@ jobs:
- *init_environment - *init_environment
# Build aio with Ivy (using local Angular packages) # Build aio with Ivy (using local Angular packages)
- run: yarn --cwd aio build-with-ivy --progress=false - run: yarn --cwd aio build-with-ivy --progress=false
# Run PWA-score tests
# (Run before unit and e2e tests, which destroy the `dist/` directory.)
- run: yarn --cwd aio test-pwa-score-localhost $CI_AIO_MIN_PWA_SCORE
# Run unit tests # Run unit tests
- run: yarn --cwd aio test --progress=false --watch=false - run: yarn --cwd aio test --progress=false --watch=false
# Run e2e tests # Run e2e tests
- run: yarn --cwd aio e2e --configuration=ci - run: yarn --cwd aio e2e --configuration=ci
# Run PWA-score tests
- run: yarn --cwd aio test-pwa-score-localhost $CI_AIO_MIN_PWA_SCORE
test_aio_tools: test_aio_tools:
<<: *job_defaults <<: *job_defaults