Skip to content

Commit

Permalink
Add scheduled tests job (#864)
Browse files Browse the repository at this point in the history
  • Loading branch information
maciektr authored Nov 7, 2023
1 parent d2daf48 commit 91bc317
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 2 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Scheduled tests

on:
workflow_dispatch:
schedule:
- cron: '0 5 * * *'

concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true

jobs:
check:
uses: ./.github/workflows/_check-release.yml
with:
fail-fast: false

notify-failed:
runs-on: ubuntu-latest
# Do not run on success
if: always() && contains(needs.*.result, 'failure')
needs: [ check ]
steps:
- name: Notifying about failed tests!
uses: slackapi/[email protected]
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_SCHEDULED_TESTS_FAILURE_WEBHOOK_URL }}
with:
payload: |
{
"url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
}
21 changes: 19 additions & 2 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,8 @@ jobs:
notify_failed:
runs-on: ubuntu-latest
# Do not run on dry_run or success
if: always() && ${{ !(inputs.dry_run) }} && contains(needs.*.result, 'failure')
needs: [ cleanup, upload, release, check, prepare ]
if: always() && !(inputs.dry_run) && contains(needs.*.result, 'failure')
needs: [ cleanup, upload, release, prepare ]
steps:
- name: Notifying about Nightly fail!
uses: slackapi/[email protected]
Expand All @@ -183,3 +183,20 @@ jobs:
{
"url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
}
notify_failed_check:
runs-on: ubuntu-latest
# Do not run on dry_run, check success or if we have already notified
if: always() && !(inputs.dry_run) && needs.check.result == 'failure' && needs.notify_failed.result == 'skipped'
needs: [ check, notify_failed ]
steps:
- name: Notifying about check fail!
uses: slackapi/[email protected]
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_NIGHTLY_CHECK_FAILURE_WEBHOOK_URL }}
with:
payload: |
{
"url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
}

0 comments on commit 91bc317

Please sign in to comment.