From 51918cd6c51a7b500a771dcb987b4139de89a732 Mon Sep 17 00:00:00 2001 From: Joey Perrott Date: Thu, 20 Jul 2023 14:46:21 +0000 Subject: [PATCH 1/3] ci: migrate api golden check to GHA Migrate api golden test to Github Actions --- .circleci/config.yml | 22 ---------------------- .github/workflows/ci.yml | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 22 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 19164f0d0653..01bb8c30be0d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -186,26 +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 # ----------------------------------------------------------------- @@ -553,8 +533,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: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f42dd53c4150..c6c559764e53 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -56,3 +56,19 @@ 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/... From 45199944fa6529e5c4f8dca7900cbb3a89b8f1ba Mon Sep 17 00:00:00 2001 From: Joey Perrott Date: Thu, 20 Jul 2023 14:53:25 +0000 Subject: [PATCH 2/3] ci: migrate e2e tests to GHA Migrate e2e tests to Github Actions --- .circleci/config.yml | 24 ------------------------ .github/workflows/ci.yml | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 24 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 01bb8c30be0d..e85e39aad78c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -186,28 +186,6 @@ jobs: - run: bazel build --build_tag_filters=-docs-package,-release-package -- src/... - *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). # ------------------------------------------------------------------------------------------ @@ -545,8 +523,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: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c6c559764e53..5f59c09ed9a3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -72,3 +72,19 @@ jobs: 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 From a661aaf4e5028f0e7cccf004b6d65208103efe35 Mon Sep 17 00:00:00 2001 From: Joey Perrott Date: Thu, 20 Jul 2023 15:01:14 +0000 Subject: [PATCH 3/3] ci: move integration tests to GHA Migrate integration tests to Github Action --- .circleci/config.yml | 26 -------------------------- .github/workflows/ci.yml | 21 +++++++++++++++++++++ 2 files changed, 21 insertions(+), 26 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index e85e39aad78c..b8d12990b11c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -389,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. # ---------------------------------------------------------------------------- @@ -511,8 +487,6 @@ workflows: jobs: - bazel_build: filters: *ignore_presubmit_branch_filter - - integration_tests: - filters: *ignore_presubmit_branch_filter - linker_aot_test: filters: *ignore_presubmit_branch_filter - linker_jit_test: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5f59c09ed9a3..09db0e8229bc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -88,3 +88,24 @@ jobs: 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