Skip to content

build: fix cronjob tests not running against snapshots #14327

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

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,21 @@ jobs:

- run: ./scripts/circleci/publish-snapshots.sh


# ----------------------------------------------------------------------------
# Job that runs the local browser tests against the Angular Github snapshots
# ----------------------------------------------------------------------------
snapshot_tests_local_browsers:
docker: *docker-firefox-image
resource_class: xlarge
steps:
- *checkout_code
- *restore_cache
- *yarn_install

- run: ./scripts/install-angular-snapshots.sh
- run: ./scripts/circleci/run-local-browser-tests.sh

# ----------------------------------------------------------------------------------------
# Workflow definitions. A workflow usually groups multiple jobs together. This is useful if
# one job depends on another.
Expand Down Expand Up @@ -311,7 +326,10 @@ workflows:
# This workflow runs various jobs against the Angular snapshot builds from Github.
snapshot_tests:
jobs:
- tests_local_browsers
# Note that we need additional jobs for the nightly snapshot tests because there is no
# easy way to detect whether a job runs inside of a cronjob or specific workflow.
# See: https://circleci.com/ideas/?idea=CCI-I-295
- snapshot_tests_local_browsers
triggers:
- schedule:
cron: "0 0 * * *"
Expand Down
6 changes: 0 additions & 6 deletions scripts/circleci/run-local-browser-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,6 @@ set -e
# Go to project directory.
cd $(dirname ${0})/../..

# In case the "snapshot_tests" workflow is currently running this script, we
# want to run the local browser tests against the Angular snapshot builds.
if [[ "${CIRCLE_WORKFLOW_ID}" == "snapshot_tests" ]]; then
./scripts/install-angular-snapshots.sh
fi

# Setup the test platform environment variable that will be read
# by the Karma configuration script.
export TEST_PLATFORM="local"
Expand Down