Skip to content

Commit

Permalink
ci: migrate docs site monitoring to Github Actions
Browse files Browse the repository at this point in the history
Move doc site monitoring from CircleCI to Github Actions, additionally runs the tests every 4 hours instead of once per hour.

(cherry picked from commit e099c37)
  • Loading branch information
josephperrott committed Oct 19, 2023
1 parent 07f0fda commit 29c710d
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 39 deletions.
34 changes: 0 additions & 34 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -253,22 +253,6 @@ jobs:
- run: yarn ci-push-deploy-docs-app
- *slack_notify_on_failure

# ----------------------------------------
# Job that monitors the docs site, ensuring
# the docs site is online and works as expected.
# ----------------------------------------
monitor_docs_site:
docker:
- image: *docker-browser-image
resource_class: xlarge
steps:
- checkout_and_rebase
- *restore_cache
- *yarn_install

- run: yarn ci-docs-monitor-test
- *slack_notify_on_failure

# ----------------------------------------
# Job that publishes the build snapshots
# ----------------------------------------
Expand Down Expand Up @@ -339,21 +323,3 @@ workflows:
filters: *publish_branches_filter
requires:
- build_release_packages

# 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.
snapshot_tests:
jobs:
- monitor_docs_site:
filters: *only_main_branch_filter

triggers:
- schedule:
cron: '0 * * * *'
filters:
branches:
only:
# We only want to run the main branch against the snapshot builds because
# it's not guaranteed that older versions of Angular Material always work
# with the latest Angular version.
- main
30 changes: 25 additions & 5 deletions .github/workflows/scheduled-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Scheduled CI

on:
schedule:
- cron: '0 0/4 * * *'
- cron: '0 0/4 * * *'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -27,7 +27,7 @@ jobs:
- 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
# 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
Expand Down Expand Up @@ -55,7 +55,7 @@ jobs:
- 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
# 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
Expand Down Expand Up @@ -85,7 +85,7 @@ jobs:
- 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
# 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
Expand All @@ -101,4 +101,24 @@ jobs:
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 }}
SLACK_BOT_TOKEN: ${{ secrets.ANGULAR_ROBOT_SLACK_TOKEN }}

monitor-docs-site:
runs-on: ubuntu-latest
steps:
- name: Initialize environment
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@fb30926790c6225d553b91a4818cab2fdde4fb4e
with:
cache-node-modules: true
- name: Install node modules
run: yarn install --frozen-lockfile
- name: Check Docs Site
run: yarn ci-docs-monitor-test
- name: Notify about failed test
if: ${{ failure() }}
uses: slackapi/slack-github-action@e28cf165c92ffef168d23c5c9000cffc8a25e117 # v=v1.24.0
with:
channel-id: 'C015EBF2XB6'
slack-message: 'Docs site monitoring 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 }}

0 comments on commit 29c710d

Please sign in to comment.