Skip to content

Commit

Permalink
added dailies with email notifs (#320)
Browse files Browse the repository at this point in the history
  • Loading branch information
pauladkisson authored May 3, 2024
1 parent 8750dfe commit 475ab10
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 14 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/dailies.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Daily Workflows

on:
workflow_dispatch:
schedule:
- cron: "0 14 * * *" # Daily at 10am EST

jobs:
update-testing-data:
uses: ./.github/workflows/update-testing-data.yml

run-tests:
needs: update-testing-data
uses: ./.github/workflows/run-tests.yml

notify:
runs-on: ubuntu-latest
needs: [update-testing-data, run-tests]
if: ${{ always() && contains(needs.*.result, 'failure') }}
steps:
- uses: dawidd6/action-send-mail@v3
with:
server_address: smtp.gmail.com
server_port: 465 # TSL
username: ${{ secrets.MAIL_USERNAME }}
password: ${{ secrets.MAIL_PASSWORD }}
subject: ROIExtractors Daily Failure
to: ${{ secrets.DAILY_FAILURE_EMAIL_LIST }} # add more with commas, no separation
from: NWB Inspector
body: "The daily workflow for ROIExtractors failed: please check status at https://github.com/catalystneuro/roiextractors/actions/workflows/dailies.yml"
13 changes: 1 addition & 12 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,12 @@ name: Full Tests
on:
pull_request:
workflow_dispatch:
workflow_run:
workflows: [update-testing-data]
types: [completed]

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
on-failure:
name: Notify on failure
runs-on: ${{ matrix.os }}
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
steps:
- run: |
echo 'The triggering workflow failed.'
0
assess-file-changes:
uses: ./.github/workflows/assess-file-changes.yml

Expand All @@ -35,7 +24,7 @@ jobs:
echo "CHANGELOG.md has not been updated."
0
on-success:
run:
name: Full tests on ${{ matrix.os }} with Python ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
strategy:
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/update-testing-data.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
name: update-testing-data
on:
schedule:
- cron: "0 0 * * *" # daily
workflow_dispatch:

jobs:
Expand Down

0 comments on commit 475ab10

Please sign in to comment.