-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: migrate snapshot test to Github Actions
Move snapshot test from CircleCI to Github Actions, additionally runs the tests every 4 hours instead of once per hour. (cherry picked from commit cddd036)
- Loading branch information
1 parent
91476e0
commit 07f0fda
Showing
2 changed files
with
104 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
name: Scheduled CI | ||
|
||
on: | ||
schedule: | ||
- cron: '0 0/4 * * *' | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
permissions: {} | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
test_browsers: | ||
runs-on: ubuntu-latest-4core | ||
steps: | ||
- name: Initialize environment | ||
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@fb30926790c6225d553b91a4818cab2fdde4fb4e | ||
with: | ||
cache-node-modules: true | ||
- name: Setup Bazel | ||
uses: angular/dev-infra/github-actions/bazel/setup@fb30926790c6225d553b91a4818cab2fdde4fb4e | ||
- name: Setup Bazel RBE | ||
uses: angular/dev-infra/github-actions/bazel/configure-remote@fb30926790c6225d553b91a4818cab2fdde4fb4e | ||
- name: Setting up Angular snapshot builds | ||
# Angular snapshots must be set up first so that the yarn install properly | ||
# updates the yarn.lock as expected with the changes | ||
run: node ./scripts/circleci/setup-angular-snapshots.js main | ||
- name: Install node modules | ||
run: yarn install | ||
- name: Run Browser tests | ||
run: yarn bazel test --build_tag_filters=-e2e --test_tag_filters=-e2e --build_tests_only -- src/... | ||
- name: Notify about failed test | ||
if: ${{ failure() }} | ||
uses: slackapi/slack-github-action@e28cf165c92ffef168d23c5c9000cffc8a25e117 # v=v1.24.0 | ||
with: | ||
channel-id: 'C015EBF2XB6' | ||
slack-message: 'Browser snapshot 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_tests: | ||
runs-on: ubuntu-latest-4core | ||
steps: | ||
- name: Initialize environment | ||
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@fb30926790c6225d553b91a4818cab2fdde4fb4e | ||
with: | ||
cache-node-modules: true | ||
- name: Setup Bazel | ||
uses: angular/dev-infra/github-actions/bazel/setup@fb30926790c6225d553b91a4818cab2fdde4fb4e | ||
- name: Setup Bazel RBE | ||
uses: angular/dev-infra/github-actions/bazel/configure-remote@fb30926790c6225d553b91a4818cab2fdde4fb4e | ||
- name: Setting up Angular snapshot builds | ||
# Angular snapshots must be set up first so that the yarn install properly | ||
# updates the yarn.lock as expected with the changes | ||
run: node ./scripts/circleci/setup-angular-snapshots.js main | ||
- name: Install node modules | ||
run: yarn install | ||
- name: Run linker tests using AOT | ||
run: yarn test-linker-aot | ||
- name: Run linker tests using JIT | ||
run: yarn test-linker-jit | ||
- name: Notify about failed test | ||
if: ${{ failure() }} | ||
uses: slackapi/slack-github-action@e28cf165c92ffef168d23c5c9000cffc8a25e117 # v=v1.24.0 | ||
with: | ||
channel-id: 'C015EBF2XB6' | ||
slack-message: 'Snapshot linker 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 }} | ||
|
||
mdc_snapshot_test: | ||
runs-on: ubuntu-latest-4core | ||
steps: | ||
- name: Initialize environment | ||
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@fb30926790c6225d553b91a4818cab2fdde4fb4e | ||
with: | ||
cache-node-modules: true | ||
- name: Setup Bazel | ||
uses: angular/dev-infra/github-actions/bazel/setup@fb30926790c6225d553b91a4818cab2fdde4fb4e | ||
- name: Setup Bazel RBE | ||
uses: angular/dev-infra/github-actions/bazel/configure-remote@fb30926790c6225d553b91a4818cab2fdde4fb4e | ||
- name: Setting up Angular snapshot builds | ||
# Angular snapshots must be set up first so that the yarn install properly | ||
# updates the yarn.lock as expected with the changes | ||
run: node ./scripts/circleci/setup-angular-snapshots.js main | ||
- name: Install MDC Canary | ||
run: node ./scripts/circleci/setup-mdc-canary.js | ||
- name: Install node modules | ||
run: yarn install | ||
- name: Run browser tests using MDC Canary | ||
run: bazel test --build_tag_filters=-docs-package,-e2e --test_tag_filters=-e2e --build_tests_only -- src/... | ||
- name: Notify about failed test | ||
if: ${{ failure() }} | ||
uses: slackapi/slack-github-action@e28cf165c92ffef168d23c5c9000cffc8a25e117 # v=v1.24.0 | ||
with: | ||
channel-id: 'C015EBF2XB6' | ||
slack-message: 'MDC snapshot 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 }} |