Skip to content
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

ci: migrate browser tests to GHA #27675

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

# ------------------------------------------------------------------------------------------
# Job that runs the unit tests on Bazel-provided browsers (Chrome and Firefox headless).
# ------------------------------------------------------------------------------------------
tests_browsers:
<<: *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 --build_tag_filters=-e2e --test_tag_filters=-e2e --build_tests_only -- src/...
- *slack_notify_on_failure
josephperrott marked this conversation as resolved.
Show resolved Hide resolved

# -------------------------------------------------------------------------------------------
# Job that builds all release packages. The built packages can be then used in the same
# workflow to publish snapshot builds.
Expand Down Expand Up @@ -408,8 +389,6 @@ workflows:
jobs:
- bazel_build:
filters: *ignore_presubmit_branch_filter
- tests_browsers:
filters: *ignore_presubmit_branch_filter
- build_release_packages:
filters: *ignore_presubmit_branch_filter
- upload_release_packages:
Expand All @@ -426,7 +405,6 @@ workflows:
filters: *publish_branches_filter
requires:
- build_release_packages
- tests_browsers

# Snapshot tests workflow that is scheduled to run all specified jobs every hour.
# This workflow runs various jobs against the Angular snapshot builds from Github.
Expand Down
1 change: 0 additions & 1 deletion .github/angular-robot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ merge:
# list of PR statuses that need to be successful
requiredStatuses:
- 'ci/circleci: bazel_build'
- 'ci/circleci: tests_browsers'
- 'ci/circleci: build_release_packages'

# the comment that will be added when the merge label is added despite failing checks, leave empty or set to false to disable
Expand Down
64 changes: 64 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,14 @@ jobs:
# it has been merged.
if: github.event_name == 'pull_request'
run: yarn ng-dev format changed --check ${{ github.event.pull_request.base.sha }}
- name: Notify about failed test
if: ${{ failure() && github.event_name == 'push'}}
uses: slackapi/slack-github-action@e28cf165c92ffef168d23c5c9000cffc8a25e117 # v=v1.24.0
with:
channel-id: 'C015EBF2XB6'
slack-message: 'Lint test job failed for ${{ github.base_ref }} branch failed on build ${{ github.event.after }}: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}'
env:
SLACK_BOT_TOKEN: ${{ secrets.ANGULAR_ROBOT_SLACK_TOKEN }}

api_golden_checks:
runs-on: ubuntu-latest
Expand All @@ -72,6 +80,14 @@ jobs:
run: yarn install --frozen-lockfile
- name: Check API Goldens
run: yarn bazel test tools/public_api_guard/...
- name: Notify about failed test
if: ${{ failure() && github.event_name == 'push'}}
uses: slackapi/slack-github-action@e28cf165c92ffef168d23c5c9000cffc8a25e117 # v=v1.24.0
with:
channel-id: 'C015EBF2XB6'
slack-message: 'API Goldens test job failed for ${{ github.base_ref }} branch failed on build ${{ github.event.after }}: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}'
env:
SLACK_BOT_TOKEN: ${{ secrets.ANGULAR_ROBOT_SLACK_TOKEN }}

e2e:
runs-on: ubuntu-latest
Expand All @@ -88,6 +104,14 @@ jobs:
run: yarn install --frozen-lockfile
- name: Run e2e tests
run: yarn e2e --flaky_test_attempts=2
- name: Notify about failed test
if: ${{ failure() && github.event_name == 'push'}}
uses: slackapi/slack-github-action@e28cf165c92ffef168d23c5c9000cffc8a25e117 # v=v1.24.0
with:
channel-id: 'C015EBF2XB6'
slack-message: 'E2E test job failed for ${{ github.base_ref }} branch failed on build ${{ github.event.after }}: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}'
env:
SLACK_BOT_TOKEN: ${{ secrets.ANGULAR_ROBOT_SLACK_TOKEN }}

integration:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -131,6 +155,14 @@ jobs:
run: yarn install --frozen-lockfile
- name: Run linker AOT tests
run: yarn test-linker-aot
- name: Notify about failed test
if: ${{ failure() && github.event_name == 'push'}}
uses: slackapi/slack-github-action@e28cf165c92ffef168d23c5c9000cffc8a25e117 # v=v1.24.0
with:
channel-id: 'C015EBF2XB6'
slack-message: 'Linker AOT test job failed for ${{ github.base_ref }} branch failed on build ${{ github.event.after }}: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}'
env:
SLACK_BOT_TOKEN: ${{ secrets.ANGULAR_ROBOT_SLACK_TOKEN }}

linker_jit_tests:
runs-on: ubuntu-latest-4core
Expand All @@ -147,3 +179,35 @@ jobs:
run: yarn install --frozen-lockfile
- name: Run linker JIT tests
run: yarn test-linker-jit
- name: Notify about failed test
if: ${{ failure() && github.event_name == 'push'}}
uses: slackapi/slack-github-action@e28cf165c92ffef168d23c5c9000cffc8a25e117 # v=v1.24.0
with:
channel-id: 'C015EBF2XB6'
slack-message: 'Linker JIT test job failed for ${{ github.base_ref }} branch failed on build ${{ github.event.after }}: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}'
env:
SLACK_BOT_TOKEN: ${{ secrets.ANGULAR_ROBOT_SLACK_TOKEN }}

test:
runs-on: ubuntu-latest-16core
steps:
- name: Initialize environment
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@9931e1a8d1b62fcd2267e89f9993a494856cc1cd
with:
cache-node-modules: true
- name: Setup Bazel
uses: angular/dev-infra/github-actions/bazel/setup@9931e1a8d1b62fcd2267e89f9993a494856cc1cd
- name: Setup Bazel RBE
uses: angular/dev-infra/github-actions/bazel/configure-remote@9931e1a8d1b62fcd2267e89f9993a494856cc1cd
- name: Install node modules
run: yarn install --frozen-lockfile
- name: Run tests
run: bazel test --build_tag_filters=-e2e --test_tag_filters=-e2e --build_tests_only -- src/...
- name: Notify about failed test
if: ${{ failure() && github.event_name == 'push'}}
uses: slackapi/slack-github-action@e28cf165c92ffef168d23c5c9000cffc8a25e117 # v=v1.24.0
with:
channel-id: 'C015EBF2XB6'
slack-message: 'Browser test job failed for ${{ github.base_ref }} branch failed on build ${{ github.event.after }}: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}'
env:
SLACK_BOT_TOKEN: ${{ secrets.ANGULAR_ROBOT_SLACK_TOKEN }}
Loading