Skip to content

Commit

Permalink
Add Slack notification
Browse files Browse the repository at this point in the history
  • Loading branch information
nigelmegitt committed Dec 21, 2021
1 parent 2b68e25 commit 55462e9
Showing 1 changed file with 18 additions and 13 deletions.
31 changes: 18 additions & 13 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: Check the tests pass

on: pull_request
on:
push:
branches:
- master
pull_request:

jobs:
build:
Expand Down Expand Up @@ -40,15 +44,16 @@ jobs:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
run: |
coveralls
# At this point we would like to report coverage, but this doesn't work with Python 2.7
# - name: Install coveragepy-lcov
# run: |
# pip install coveragepy-lcov
# - name: Convert .coverage to lcov.info
# run: |
# coveragepy-lcov
# - name: Coveralls GitHub Action
# uses: coverallsapp/github-action@1.1.3
# with:
# github-token: ${{ secrets.GITHUB_TOKEN }}
# path-to-lcov: lcov.info
- name: Build notification
if: always()
uses: edge/simple-slack-notify@v1.1.2
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
with:
channel: '#ci'
status: ${{ job.status }}
success_text: 'Build (#${env.GITHUB_RUN_NUMBER}) completed successfully'
failure_text: 'Build (#${env.GITHUB_RUN_NUMBER}) failed'
cancelled_text: 'Build (#${env.GITHUB_RUN_NUMBER}) was cancelled'
fields: |
[{ "title": "Action URL", "value": "${env.GITHUB_SERVER_URL}/${env.GITHUB_REPOSITORY}/actions/runs/${env.GITHUB_RUN_ID}"}]

0 comments on commit 55462e9

Please sign in to comment.