7
7
# To validate changes, use an online parser, eg.
8
8
# http://yaml-online-parser.appspot.com/
9
9
10
- var_1 : &docker_image circleci/node:12.9 .1
11
- var_2 : &docker-firefox-image circleci/node:12.9 .1-browsers
10
+ var_1 : &docker_image circleci/node:14.16 .1
11
+ var_2 : &docker-firefox-image circleci/node:14.16 .1-browsers
12
12
13
13
# **Note**: When updating the beginning of the cache key, also update the cache key to match
14
14
# the new cache key prefix. This allows us to take advantage of CircleCI's fallback caching.
15
15
# Read more here: https://circleci.com/docs/2.0/caching/#restoring-cache.
16
- var_3 : &cache_key v6 -ng-mat-{{ checksum ".bazelversion" }}-{{ checksum "tools/postinstall/apply-patches.js" }}-{{ checksum "WORKSPACE" }}-{{ checksum "yarn.lock" }}
16
+ var_3 : &cache_key v7 -ng-mat-{{ checksum ".bazelversion" }}-{{ checksum "tools/postinstall/apply-patches.js" }}-{{ checksum "WORKSPACE" }}-{{ checksum "yarn.lock" }}
17
17
# We want to invalidate the cache if the postinstall patches change. In order to apply new
18
18
# patches, a clean version of the node modules is needed. Additionally, we invalidate the cache
19
19
# if the Bazel version changes. We do this because otherwise the `bazelisk` cache folder will
20
20
# contain all previously used versions and ultimately cause the cache restoring to be slower.
21
- var_4 : &cache_fallback_key v6 -ng-mat-{{ checksum ".bazelversion" }}-{{ checksum "tools/postinstall/apply-patches.js" }}-
21
+ var_4 : &cache_fallback_key v7 -ng-mat-{{ checksum ".bazelversion" }}-{{ checksum "tools/postinstall/apply-patches.js" }}-
22
22
23
23
# Settings common to each job
24
24
var_5 : &job_defaults
@@ -118,25 +118,25 @@ var_18: &setup_snapshot_builds
118
118
name : " Setting up Angular snapshot builds"
119
119
command : node ./scripts/circleci/setup-angular-snapshots.js master
120
120
121
- # Filter to skip a job on builds for pull requests.
122
- var_19 : &skip_on_pull_requests_filter
123
- branches :
124
- ignore :
125
- - /pull\/\d+/
126
-
127
121
# Filter which ensures that jobs only run for pull requests.
128
- var_20 : &only_on_pull_requests_filter
122
+ var_19 : &only_on_pull_requests_filter
129
123
branches :
130
124
only :
131
125
- /pull\/\d+/
132
126
133
127
# Anchor for a step that notifies Slack when preceding steps failed.
134
- var_21 : &slack_notify_on_failure
128
+ var_20 : &slack_notify_on_failure
135
129
run :
136
130
name : " Notifying team about job failure"
137
131
when : on_fail
138
132
command : node ./scripts/circleci/notify-slack-job-failure.js
139
133
134
+ # Branch filter that only matches the main branch.
135
+ var_21 : &only_main_branch_filter
136
+ branches :
137
+ only :
138
+ - master
139
+
140
140
# -----------------------------
141
141
# Container version of CircleCI
142
142
# -----------------------------
@@ -197,7 +197,8 @@ jobs:
197
197
198
198
# Exclude release and docs packages here as those will be built within
199
199
# the "build_release_packages" and "publish_snapshots" jobs.
200
- - run : bazel build src/... --build_tag_filters=-docs-package,-release-package
200
+ # TODO(devversion): remove target exclusion once https://github.com/bazelbuild/rules_nodejs/pull/2646 is available.
201
+ - run : bazel build --build_tag_filters=-docs-package,-release-package -- src/... -//src/e2e-app:devserver_with_linked_declarations.MF
201
202
- *slack_notify_on_failure
202
203
203
204
# -----------------------------------
@@ -219,7 +220,8 @@ jobs:
219
220
220
221
# Exclude release and docs packages here as those will be built within
221
222
# the "build_release_packages" and "publish_snapshots" jobs.
222
- - run : bazel build src/... --build_tag_filters=-docs-package,-release-package --config=view-engine
223
+ # TODO(devversion): remove target exclusion once https://github.com/bazelbuild/rules_nodejs/pull/2646 is available.
224
+ - run : bazel build --build_tag_filters=-docs-package,-release-package --config=view-engine -- src/... -//src/e2e-app:devserver_with_linked_declarations.MF
223
225
- *slack_notify_on_failure
224
226
225
227
# --------------------------------------------------------------------------------------------
@@ -281,7 +283,8 @@ jobs:
281
283
- *yarn_install
282
284
- *setup_bazel_binary
283
285
284
- - run : bazel test src/... --build_tag_filters=-e2e --test_tag_filters=-e2e --build_tests_only
286
+ # TODO(devversion): remove target exclusion once https://github.com/bazelbuild/rules_nodejs/pull/2646 is available.
287
+ - run : bazel test --build_tag_filters=-e2e --test_tag_filters=-e2e --build_tests_only -- src/... -//src/e2e-app:devserver_with_linked_declarations.MF
285
288
- *slack_notify_on_failure
286
289
287
290
# ----------------------------------------------------------------------------
@@ -353,20 +356,21 @@ jobs:
353
356
yarn check-entry-point-setup $(bazel info bazel-bin)/entry_points_manifest.json
354
357
355
358
- run : yarn ng-dev format changed --check << pipeline.git.base_revision >>
359
+ - run : yarn ownerslint
360
+ - run : yarn check-mdc-tests
361
+ - run : yarn stylelint
362
+ - run : yarn tslint
363
+ - run : yarn -s ts-circular-deps:check
364
+ - run : yarn check-mdc-exports
365
+ # Should be last so that it doesn't prevent the other lint checks from running.
356
366
- run :
357
367
name : Check Commit Message (PR Only)
358
368
# Only run the commit message checks on pull requests since we can't do
359
369
# much about any failures that have made it into the main branch.
360
370
command : |
361
371
if [ -n "$CIRCLE_PR_NUMBER" ]; then
362
- yarn ng-dev commit-message validate-range --range $CI_COMMIT_RANGE
372
+ yarn ng-dev commit-message validate-range $CI_GIT_BASE_REVISION $CI_GIT_REVISION
363
373
fi
364
- - run : yarn ownerslint
365
- - run : yarn check-mdc-tests
366
- - run : yarn stylelint
367
- - run : yarn tslint
368
- - run : yarn -s ts-circular-deps:check
369
- - run : yarn check-mdc-exports
370
374
371
375
- *slack_notify_on_failure
372
376
- *save_cache
@@ -409,28 +413,6 @@ jobs:
409
413
root : dist
410
414
paths :
411
415
- " releases/**/*"
412
-
413
- # Since there is no UMD bundle that includes everything from the CDK, we need to move
414
- # all bundles into a directory. This allows us to store all CDK UMD bundles as job
415
- # artifacts that can be picked up by the Angular Github bot.
416
- - run :
417
- name : Prepare CDK artifacts for publish.
418
- command : |
419
- mkdir -p /tmp/cdk-umd-minified-bundles
420
- cp dist/releases/cdk/bundles/*.umd.min.js /tmp/cdk-umd-minified-bundles
421
- # Publish bundle artifacts which will be used to calculate the size change.
422
- # Note: Make sure that the size plugin from the Angular robot fetches the artifacts
423
- # from this CircleCI job (see .github/angular-robot.yml). Additionally any artifacts need to
424
- # be stored with the following path format: "{projectName}/{context}/{fileName}"
425
- # This format is necessary because otherwise the bot is not able to pick up the
426
- # artifacts from CircleCI. See:
427
- # https://github.com/angular/github-robot/blob/master/functions/src/plugins/size.ts#L392-L394
428
- - store_artifacts :
429
- path : dist/releases/material/bundles/material.umd.min.js
430
- destination : /angular_material/material_release_output/material.umd.min.js
431
- - store_artifacts :
432
- path : /tmp/cdk-umd-minified-bundles
433
- destination : /angular_material/cdk_release_output/
434
416
- *slack_notify_on_failure
435
417
436
418
upload_release_packages :
@@ -554,7 +536,8 @@ jobs:
554
536
- *yarn_install_loose_lockfile
555
537
- *setup_bazel_binary
556
538
557
- - run : bazel test src/... --build_tag_filters=-e2e --test_tag_filters=-e2e --build_tests_only
539
+ # TODO(devversion): remove target exclusion once https://github.com/bazelbuild/rules_nodejs/pull/2646 is available.
540
+ - run : bazel test --build_tag_filters=-e2e --test_tag_filters=-e2e --build_tests_only -- src/... -//src/e2e-app:devserver_with_linked_declarations.MF
558
541
- *slack_notify_on_failure
559
542
560
543
# ----------------------------------------------------------------------------
@@ -575,7 +558,8 @@ jobs:
575
558
- *setup_bazel_binary
576
559
577
560
# Run project tests with NGC and View Engine.
578
- - run : bazel test src/... --build_tag_filters=-docs-package,-e2e --test_tag_filters=-e2e --config=view-engine --build_tests_only
561
+ # TODO(devversion): remove target exclusion once https://github.com/bazelbuild/rules_nodejs/pull/2646 is available.
562
+ - run : bazel test --build_tag_filters=-docs-package,-e2e --test_tag_filters=-e2e --config=view-engine --build_tests_only -- src/... -//src/e2e-app:devserver_with_linked_declarations.MF
579
563
- *slack_notify_on_failure
580
564
581
565
# ----------------------------------------------------------------------------
@@ -596,7 +580,8 @@ jobs:
596
580
- *setup_bazel_binary
597
581
598
582
# Run project tests with NGC and View Engine.
599
- - run : bazel test src/... --build_tag_filters=-docs-package,-e2e --test_tag_filters=-e2e --config=view-engine --build_tests_only
583
+ # TODO(devversion): remove target exclusion once https://github.com/bazelbuild/rules_nodejs/pull/2646 is available.
584
+ - run : bazel test --build_tag_filters=-docs-package,-e2e --test_tag_filters=-e2e --config=view-engine --build_tests_only -- src/... -//src/e2e-app:devserver_with_linked_declarations.MF
600
585
- *slack_notify_on_failure
601
586
602
587
# ----------------------------------------------------------------------------
@@ -614,6 +599,9 @@ jobs:
614
599
- *setup_bazel_remote_execution
615
600
- *yarn_install
616
601
- *setup_bazel_binary
602
+
603
+ - run : yarn integration-tests:partial-ivy
604
+ - run : yarn integration-tests:view-engine
617
605
# TODO: Re-enable when there are integration tests that should run with Ivy.
618
606
# Currently this command fails as there are no tests.
619
607
# - run: yarn integration-tests
@@ -622,7 +610,26 @@ jobs:
622
610
command : |
623
611
# If the size integration tests fail, report the failure to a dedicated #components-ci-size-tracking Slack channel.
624
612
yarn integration-tests:size-test || node ./scripts/circleci/notify-slack-job-failure.js components-ci-size-tracking
625
- - run : yarn integration-tests:view-engine
613
+ - *slack_notify_on_failure
614
+
615
+ # ----------------------------------------------------------------------------
616
+ # Job that runs all integration tests against Angular snapshot builds.
617
+ # ----------------------------------------------------------------------------
618
+ integration_tests_snapshot :
619
+ << : *job_defaults
620
+ resource_class : xlarge
621
+ environment :
622
+ GCP_DECRYPT_TOKEN : *gcp_decrypt_token
623
+ steps :
624
+ - checkout_and_rebase
625
+ - *restore_cache
626
+ - *setup_bazel_ci_config
627
+ - *setup_bazel_remote_execution
628
+ - *setup_snapshot_builds
629
+ - *yarn_install_loose_lockfile
630
+ - *setup_bazel_binary
631
+
632
+ - run : yarn integration-tests:partial-ivy
626
633
- *slack_notify_on_failure
627
634
628
635
# ----------------------------------------------------------------------------
@@ -636,17 +643,19 @@ jobs:
636
643
steps :
637
644
- checkout_and_rebase
638
645
- *restore_cache
646
+ - *yarn_install_loose_lockfile
639
647
- *setup_bazel_binary
640
648
- *setup_bazel_ci_config
641
649
- *setup_bazel_remote_execution
642
650
- *yarn_install
643
651
644
652
# Install the latest canary version of the "material-components-web".
645
- - run : yarn add material-components-web@ canary
653
+ - run : node ./scripts/circleci/setup-mdc- canary.js
646
654
647
655
# Setup the components repository to use the MDC snapshot builds.
648
656
# Run project tests with the MDC canary builds.
649
- - run : bazel test src/... --build_tag_filters=-docs-package,-e2e --test_tag_filters=-e2e --build_tests_only
657
+ # TODO(devversion): remove target exclusion once https://github.com/bazelbuild/rules_nodejs/pull/2646 is available.
658
+ - run : bazel test --build_tag_filters=-docs-package,-e2e --test_tag_filters=-e2e --build_tests_only -- src/... -//src/e2e-app:devserver_with_linked_declarations.MF
650
659
- *slack_notify_on_failure
651
660
652
661
# ----------------------------------------------------------------------------------------
@@ -694,7 +703,7 @@ workflows:
694
703
requires :
695
704
- build_release_packages
696
705
- ngcc_compatibility_snapshot :
697
- filters : *skip_on_pull_requests_filter
706
+ filters : *only_main_branch_filter
698
707
requires :
699
708
- build_release_packages
700
709
- publish_snapshots :
@@ -709,9 +718,14 @@ workflows:
709
718
# Note that we need additional jobs for the cronjob snapshot tests because there
710
719
# is no easy way to detect whether a job runs inside of a cronjob or specific
711
720
# workflow. See: https://circleci.com/ideas/?idea=CCI-I-295
712
- - snapshot_tests_local_browsers
713
- - view_engine_snapshot_test_cronjob
714
- - mdc_snapshot_test_cronjob
721
+ - snapshot_tests_local_browsers :
722
+ filters : *only_main_branch_filter
723
+ - view_engine_snapshot_test_cronjob :
724
+ filters : *only_main_branch_filter
725
+ - mdc_snapshot_test_cronjob :
726
+ filters : *only_main_branch_filter
727
+ - integration_tests_snapshot :
728
+ filters : *only_main_branch_filter
715
729
716
730
triggers :
717
731
- schedule :
0 commit comments