Skip to content

Commit 88f6648

Browse files
ci: migrate api golden check to GHA (#27488)
* ci: migrate api golden check to GHA Migrate api golden test to Github Actions * ci: migrate e2e tests to GHA Migrate e2e tests to Github Actions * ci: move integration tests to GHA Migrate integration tests to Github Action
1 parent 5a7da12 commit 88f6648

File tree

2 files changed

+53
-72
lines changed

2 files changed

+53
-72
lines changed

.circleci/config.yml

Lines changed: 0 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -186,48 +186,6 @@ jobs:
186186
- run: bazel build --build_tag_filters=-docs-package,-release-package -- src/...
187187
- *slack_notify_on_failure
188188

189-
# --------------------------------------------------------------------------------------------
190-
# Job that runs API golden tests in "tools/public_api_guard".
191-
# This job fails whenever an API has been updated but not explicitly approved through goldens.
192-
# --------------------------------------------------------------------------------------------
193-
api_golden_checks:
194-
<<: *job_defaults
195-
resource_class: xlarge
196-
environment:
197-
GCP_DECRYPT_TOKEN: *gcp_decrypt_token
198-
steps:
199-
- checkout_and_rebase
200-
- *restore_cache
201-
- *setup_bazel_ci_config
202-
- *setup_bazel_remote_execution
203-
- *yarn_install
204-
- *setup_bazel_binary
205-
206-
- run: bazel test tools/public_api_guard/...
207-
- *slack_notify_on_failure
208-
209-
# -----------------------------------------------------------------
210-
# Job that runs the e2e tests with Protractor and Chromium headless
211-
# -----------------------------------------------------------------
212-
e2e_tests:
213-
<<: *job_defaults
214-
resource_class: xlarge
215-
environment:
216-
GCP_DECRYPT_TOKEN: *gcp_decrypt_token
217-
steps:
218-
- checkout_and_rebase
219-
- *restore_cache
220-
- *setup_bazel_ci_config
221-
- *setup_bazel_remote_execution
222-
- *yarn_install
223-
- *setup_bazel_binary
224-
225-
# Run e2e tests. Note that protractor test targets are flaky sometimes, so we run them
226-
# with flaky test attempts. This means that Bazel will re-run a failed e2e test target
227-
# a second time to ensure it's a real test failure. This improves CI stability.
228-
- run: yarn e2e --flaky_test_attempts=2
229-
- *slack_notify_on_failure
230-
231189
# ------------------------------------------------------------------------------------------
232190
# Job that runs the unit tests on Bazel-provided browsers (Chrome and Firefox headless).
233191
# ------------------------------------------------------------------------------------------
@@ -431,30 +389,6 @@ jobs:
431389
- run: bazel test --build_tag_filters=-e2e --test_tag_filters=-e2e --build_tests_only -- src/...
432390
- *slack_notify_on_failure
433391

434-
# ----------------------------------------------------------------------------
435-
# Job that runs all Bazel integration tests.
436-
# ----------------------------------------------------------------------------
437-
integration_tests:
438-
<<: *job_defaults
439-
resource_class: xlarge
440-
environment:
441-
GCP_DECRYPT_TOKEN: *gcp_decrypt_token
442-
steps:
443-
- checkout_and_rebase
444-
- *restore_cache
445-
- *setup_bazel_ci_config
446-
- *setup_bazel_remote_execution
447-
- *yarn_install
448-
- *setup_bazel_binary
449-
450-
- run: yarn integration-tests
451-
- run:
452-
name: Running size integration tests (failures are reported in Slack only).
453-
command: |
454-
# If the size integration tests fail, report the failure to a dedicated #components-ci-size-tracking Slack channel.
455-
yarn integration-tests:size-test || yarn ci-notify-slack-failure components-ci-size-tracking
456-
- *slack_notify_on_failure
457-
458392
# ----------------------------------------------------------------------------
459393
# Job that runs the AOT linker tests.
460394
# ----------------------------------------------------------------------------
@@ -553,10 +487,6 @@ workflows:
553487
jobs:
554488
- bazel_build:
555489
filters: *ignore_presubmit_branch_filter
556-
- api_golden_checks:
557-
filters: *ignore_presubmit_branch_filter
558-
- integration_tests:
559-
filters: *ignore_presubmit_branch_filter
560490
- linker_aot_test:
561491
filters: *ignore_presubmit_branch_filter
562492
- linker_jit_test:
@@ -567,8 +497,6 @@ workflows:
567497
filters: *ignore_presubmit_branch_filter
568498
- tests_saucelabs:
569499
filters: *ignore_presubmit_branch_filter
570-
- e2e_tests:
571-
filters: *ignore_presubmit_branch_filter
572500
- build_release_packages:
573501
filters: *ignore_presubmit_branch_filter
574502
- upload_release_packages:

.github/workflows/ci.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,56 @@ jobs:
5656
# it has been merged.
5757
if: github.event_name == 'pull_request'
5858
run: yarn ng-dev format changed --check ${{ github.event.pull_request.base.sha }}
59+
60+
api_golden_checks:
61+
runs-on: ubuntu-latest
62+
steps:
63+
- name: Initialize environment
64+
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@45de46d9ba0e0689b7a846fd31ec9e241807ca71
65+
with:
66+
cache-node-modules: true
67+
- name: Setup Bazel
68+
uses: angular/dev-infra/github-actions/bazel/setup@45de46d9ba0e0689b7a846fd31ec9e241807ca71
69+
- name: Setup Bazel RBE
70+
uses: angular/dev-infra/github-actions/bazel/configure-remote@45de46d9ba0e0689b7a846fd31ec9e241807ca71
71+
- name: Install node modules
72+
run: yarn install --frozen-lockfile
73+
- name: Check API Goldens
74+
run: yarn bazel test tools/public_api_guard/...
75+
76+
e2e:
77+
runs-on: ubuntu-latest
78+
steps:
79+
- name: Initialize environment
80+
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@45de46d9ba0e0689b7a846fd31ec9e241807ca71
81+
with:
82+
cache-node-modules: true
83+
- name: Setup Bazel
84+
uses: angular/dev-infra/github-actions/bazel/setup@45de46d9ba0e0689b7a846fd31ec9e241807ca71
85+
- name: Setup Bazel RBE
86+
uses: angular/dev-infra/github-actions/bazel/configure-remote@45de46d9ba0e0689b7a846fd31ec9e241807ca71
87+
- name: Install node modules
88+
run: yarn install --frozen-lockfile
89+
- name: Run e2e tests
90+
run: yarn e2e --flaky_test_attempts=2
91+
92+
integration:
93+
runs-on: ubuntu-latest
94+
steps:
95+
- name: Initialize environment
96+
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@45de46d9ba0e0689b7a846fd31ec9e241807ca71
97+
with:
98+
cache-node-modules: true
99+
- name: Setup Bazel
100+
uses: angular/dev-infra/github-actions/bazel/setup@45de46d9ba0e0689b7a846fd31ec9e241807ca71
101+
- name: Setup Bazel RBE
102+
uses: angular/dev-infra/github-actions/bazel/configure-remote@45de46d9ba0e0689b7a846fd31ec9e241807ca71
103+
- name: Install node modules
104+
run: yarn install --frozen-lockfile
105+
- name: Run integration tests
106+
run: yarn integration-tests\
107+
# TODO: Set up slack notifications
108+
# - name: Running size integration tests (failures are reported in Slack only).
109+
# run: |
110+
# If the size integration tests fail, report the failure to a dedicated #components-ci-size-tracking Slack channel.
111+
# yarn integration-tests:size-test || yarn ci-notify-slack-failure components-ci-size-tracking

0 commit comments

Comments
 (0)