Skip to content

Commit

Permalink
ci: add slack notifications for failed tests on upstream
Browse files Browse the repository at this point in the history
Notify on slack when a test fails on the upstream branch
  • Loading branch information
josephperrott committed Oct 6, 2023
1 parent 7ce58a8 commit 665e6d2
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 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,6 +179,14 @@ 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
Expand All @@ -163,3 +203,11 @@ jobs:
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 }}

0 comments on commit 665e6d2

Please sign in to comment.