diff --git a/.github/workflows/daily_tests.yml b/.github/workflows/daily_tests.yml index 5fe653197..7f84a0186 100644 --- a/.github/workflows/daily_tests.yml +++ b/.github/workflows/daily_tests.yml @@ -35,3 +35,28 @@ jobs: ExampleDataTests: needs: ExampleDataCache uses: ./.github/workflows/testing_pipelines.yml + + NotifyOnAnyFailure: + runs-on: ubuntu-latest + needs: [DevTests, LiveServices, BuildTests, ExampleDataCache, ExampleDataTests] + if: | + ${{ + always() && ( + needs.DevTests.result == 'failure' + || needs.LiveServices.result == 'failure' + || needs.BuildTests.result == 'failure' + || needs.ExampleDataCache.result == 'failure' + || needs.ExampleDataTests.result == 'failure' + ) + }} + steps: + - uses: dawidd6/action-send-mail@v3 + with: + server_address: smtp.gmail.com + server_port: 465 + username: ${{ secrets.MAIL_USERNAME }} + password: ${{ secrets.MAIL_PASSWORD }} + subject: NeuroConv Daily Test Failure + to: ${{ secrets.DAILY_FAILURE_EMAIL_LIST }} + from: NWB Guide Daily Tests + body: "The daily tests workflow failed, please check the status at https://github.com/NeurodataWithoutBorders/nwb-guide/actions/workflows/daily_tests.yml"