Skip to content

ci: migrate api golden check to GHA #27488

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
merged 3 commits into from
Jul 24, 2023
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
72 changes: 0 additions & 72 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -186,48 +186,6 @@ jobs:
- run: bazel build --build_tag_filters=-docs-package,-release-package -- src/...
- *slack_notify_on_failure

# --------------------------------------------------------------------------------------------
# Job that runs API golden tests in "tools/public_api_guard".
# This job fails whenever an API has been updated but not explicitly approved through goldens.
# --------------------------------------------------------------------------------------------
api_golden_checks:
<<: *job_defaults
resource_class: xlarge
environment:
GCP_DECRYPT_TOKEN: *gcp_decrypt_token
steps:
- checkout_and_rebase
- *restore_cache
- *setup_bazel_ci_config
- *setup_bazel_remote_execution
- *yarn_install
- *setup_bazel_binary

- run: bazel test tools/public_api_guard/...
- *slack_notify_on_failure

# -----------------------------------------------------------------
# Job that runs the e2e tests with Protractor and Chromium headless
# -----------------------------------------------------------------
e2e_tests:
<<: *job_defaults
resource_class: xlarge
environment:
GCP_DECRYPT_TOKEN: *gcp_decrypt_token
steps:
- checkout_and_rebase
- *restore_cache
- *setup_bazel_ci_config
- *setup_bazel_remote_execution
- *yarn_install
- *setup_bazel_binary

# Run e2e tests. Note that protractor test targets are flaky sometimes, so we run them
# with flaky test attempts. This means that Bazel will re-run a failed e2e test target
# a second time to ensure it's a real test failure. This improves CI stability.
- run: yarn e2e --flaky_test_attempts=2
- *slack_notify_on_failure

# ------------------------------------------------------------------------------------------
# Job that runs the unit tests on Bazel-provided browsers (Chrome and Firefox headless).
# ------------------------------------------------------------------------------------------
Expand Down Expand Up @@ -431,30 +389,6 @@ jobs:
- run: bazel test --build_tag_filters=-e2e --test_tag_filters=-e2e --build_tests_only -- src/...
- *slack_notify_on_failure

# ----------------------------------------------------------------------------
# Job that runs all Bazel integration tests.
# ----------------------------------------------------------------------------
integration_tests:
<<: *job_defaults
resource_class: xlarge
environment:
GCP_DECRYPT_TOKEN: *gcp_decrypt_token
steps:
- checkout_and_rebase
- *restore_cache
- *setup_bazel_ci_config
- *setup_bazel_remote_execution
- *yarn_install
- *setup_bazel_binary

- run: yarn integration-tests
- run:
name: Running size integration tests (failures are reported in Slack only).
command: |
# If the size integration tests fail, report the failure to a dedicated #components-ci-size-tracking Slack channel.
yarn integration-tests:size-test || yarn ci-notify-slack-failure components-ci-size-tracking
- *slack_notify_on_failure

# ----------------------------------------------------------------------------
# Job that runs the AOT linker tests.
# ----------------------------------------------------------------------------
Expand Down Expand Up @@ -553,10 +487,6 @@ workflows:
jobs:
- bazel_build:
filters: *ignore_presubmit_branch_filter
- api_golden_checks:
filters: *ignore_presubmit_branch_filter
- integration_tests:
filters: *ignore_presubmit_branch_filter
- linker_aot_test:
filters: *ignore_presubmit_branch_filter
- linker_jit_test:
Expand All @@ -567,8 +497,6 @@ workflows:
filters: *ignore_presubmit_branch_filter
- tests_saucelabs:
filters: *ignore_presubmit_branch_filter
- e2e_tests:
filters: *ignore_presubmit_branch_filter
- build_release_packages:
filters: *ignore_presubmit_branch_filter
- upload_release_packages:
Expand Down
53 changes: 53 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,56 @@ jobs:
# it has been merged.
if: github.event_name == 'pull_request'
run: yarn ng-dev format changed --check ${{ github.event.pull_request.base.sha }}

api_golden_checks:
runs-on: ubuntu-latest
steps:
- name: Initialize environment
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@45de46d9ba0e0689b7a846fd31ec9e241807ca71
with:
cache-node-modules: true
- name: Setup Bazel
uses: angular/dev-infra/github-actions/bazel/setup@45de46d9ba0e0689b7a846fd31ec9e241807ca71
- name: Setup Bazel RBE
uses: angular/dev-infra/github-actions/bazel/configure-remote@45de46d9ba0e0689b7a846fd31ec9e241807ca71
- name: Install node modules
run: yarn install --frozen-lockfile
- name: Check API Goldens
run: yarn bazel test tools/public_api_guard/...

e2e:
runs-on: ubuntu-latest
steps:
- name: Initialize environment
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@45de46d9ba0e0689b7a846fd31ec9e241807ca71
with:
cache-node-modules: true
- name: Setup Bazel
uses: angular/dev-infra/github-actions/bazel/setup@45de46d9ba0e0689b7a846fd31ec9e241807ca71
- name: Setup Bazel RBE
uses: angular/dev-infra/github-actions/bazel/configure-remote@45de46d9ba0e0689b7a846fd31ec9e241807ca71
- name: Install node modules
run: yarn install --frozen-lockfile
- name: Run e2e tests
run: yarn e2e --flaky_test_attempts=2

integration:
runs-on: ubuntu-latest
steps:
- name: Initialize environment
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@45de46d9ba0e0689b7a846fd31ec9e241807ca71
with:
cache-node-modules: true
- name: Setup Bazel
uses: angular/dev-infra/github-actions/bazel/setup@45de46d9ba0e0689b7a846fd31ec9e241807ca71
- name: Setup Bazel RBE
uses: angular/dev-infra/github-actions/bazel/configure-remote@45de46d9ba0e0689b7a846fd31ec9e241807ca71
- name: Install node modules
run: yarn install --frozen-lockfile
- name: Run integration tests
run: yarn integration-tests\
# TODO: Set up slack notifications
# - name: Running size integration tests (failures are reported in Slack only).
# run: |
# If the size integration tests fail, report the failure to a dedicated #components-ci-size-tracking Slack channel.
# yarn integration-tests:size-test || yarn ci-notify-slack-failure components-ci-size-tracking