Skip to content

Commit a342d69

Browse files
committed
feat: add scheduled tests
1 parent bf12a36 commit a342d69

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

.github/workflows/test.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ on:
77
pull_request:
88
paths-ignore:
99
- 'README.md'
10+
schedule:
11+
- cron: '35 11 * * *'
1012

1113
# Testing only needs permissions to read the repository contents.
1214
permissions:
@@ -80,3 +82,19 @@ jobs:
8082
NETDATA_CLOUD_AUTH_TOKEN: "${{ secrets.NETDATA_CLOUD_AUTH_TOKEN }}"
8183
SPACE_ID_NON_COMMUNITY: "${{ secrets.SPACE_ID_NON_COMMUNITY }}"
8284
run: go test ./... -sweep empty
85+
86+
notify:
87+
name: Notify if fails when scheduled
88+
needs: [build, generate, test]
89+
runs-on: ubuntu-latest
90+
if: ${{ always() && contains(needs.*.result, 'failure') && github.event_name == 'schedule' }}
91+
timeout-minutes: 5
92+
steps:
93+
- name: add new github issue
94+
uses: dacbd/[email protected]
95+
with:
96+
token: ${{ secrets.NETDATABOT_GITHUB_TOKEN }}
97+
repo: infra
98+
title: Failed terraform-provider-netdata test
99+
body: |
100+
[Failed job](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})

0 commit comments

Comments
 (0)