-
Notifications
You must be signed in to change notification settings - Fork 3
74 lines (64 loc) · 3.29 KB
/
daily_tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: Daily Tests
on:
workflow_dispatch:
schedule:
- cron: "0 14 * * *" # Daily at 10am EST
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
DevTests:
uses: ./.github/workflows/testing_dev.yml
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
LiveServices:
uses: ./.github/workflows/testing_dev_with_live_services.yml
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
DANDI_STAGING_API_KEY: ${{ secrets.DANDI_STAGING_API_KEY }}
BuildTests:
uses: ./.github/workflows/testing_flask_build_and_dist.yml
ExampleDataCache:
uses: ./.github/workflows/example_data_cache.yml
secrets:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
S3_GIN_BUCKET: ${{ secrets.S3_GIN_BUCKET }}
ExampleDataTests:
needs: ExampleDataCache
uses: ./.github/workflows/testing_pipelines.yml
Debug:
runs-on: ubuntu-latest
needs: [DevTests, LiveServices, BuildTests, ExampleDataCache, ExampleDataTests]
steps:
- name: Printout which failed
run: echo ${{ (needs.DevTests.result == 'failure') || (needs.LiveServices.result == 'failure') || (needs.BuildTests.result == 'failure') || (needs.ExampleDataCache.result == 'failure') || (needs.ExampleDataTests.result == 'failure') }}
NotifyOnAnyFailure:
runs-on: ubuntu-latest
needs: [DevTests, LiveServices, BuildTests, ExampleDataCache, ExampleDataTests]
# If condition needs 'always' to trigger at all
if: always() && ${{ (needs.DevTests.result == 'failure') || (needs.LiveServices.result == 'failure') || (needs.BuildTests.result == 'failure') || (needs.ExampleDataCache.result == 'failure') || (needs.ExampleDataTests.result == 'failure') }}
steps:
- name: Printout which failed
run: |
echo "DevTests: ${{ needs.DevTests.result }}"
echo "LiveServices: ${{ needs.LiveServices.result }}"
echo "BuildTests: ${{ needs.BuildTests.result }}"
echo "ExampleDataCache: ${{ needs.ExampleDataCache.result }}"
echo "ExampleDataTests: ${{ needs.ExampleDataTests.result }}"
#- name: debugging
# run: export test=${{ (needs.DevTests.result == 'failure') || (needs.LiveServices.result == 'failure') || (needs.BuildTests.result == 'failure') || (needs.ExampleDataCache.result == 'failure') || (needs.ExampleDataTests.result == 'failure') }}
#- name: debugging print
# run: echo $any_failures
#- name: Printout logic trigger
# run: ${{ needs.DevTests.result }} == 'failure' || ${{ needs.LiveServices.result }} == 'failure' || ${{ needs.BuildTests.result }} == 'failure' || ${{ needs.ExampleDataCache.result }} == 'failure' || ${{ needs.ExampleDataTests.result }} == 'failure'
- uses: dawidd6/action-send-mail@v3
with:
server_address: smtp.gmail.com
server_port: 465
username: ${{ secrets.MAIL_USERNAME }}
password: ${{ secrets.MAIL_PASSWORD }}
subject: NWB GUIDE 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"