Skip to content

Commit

Permalink
Merge pull request #171 from ar-io/slack-webhooks
Browse files Browse the repository at this point in the history
chore(github): add slack webhook to tests
  • Loading branch information
dtfiedler authored Jul 16, 2024
2 parents d689599 + 3fb6b10 commit ec36ee0
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,13 @@ jobs:

test:
runs-on: ubuntu-latest
strategy:
matrix:
node_version: [18.x]
steps:
- uses: actions/checkout@v4

- name: Set Up node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node_version }}
node-version-file: .nvmrc
cache: 'yarn'

- name: Install dependencies
Expand All @@ -53,3 +50,19 @@ jobs:
uses: codecov/codecov-action@v4.0.1
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

- name: Send Slack failure notification
if: failure() && (github.event_name == 'pull_request' && (github.base_ref == 'main' || github.base_ref == 'alpha'))
env:
SLACK_TITLE: Build / E2E tests failed!
SLACK_COLOR: danger
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
uses: rtCamp/action-slack-notify@v2

- name: Send Slack success notification
if: success() && (github.event_name == 'pull_request' && (github.base_ref == 'main' || github.base_ref == 'alpha'))
env:
SLACK_TITLE: Build / E2E tests succeeded!
SLACK_COLOR: good
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
uses: rtCamp/action-slack-notify@v2

0 comments on commit ec36ee0

Please sign in to comment.