From 4d186ef38adb3a06d64bb35aefdc18af93dc0422 Mon Sep 17 00:00:00 2001 From: Ankita Katiyar <110245118+ankatiyar@users.noreply.github.com> Date: Tue, 19 Sep 2023 18:56:01 +0100 Subject: [PATCH] Add nightly build workflow and create an issue if it fails (#3032) --- .github/workflows/all-checks.yml | 1 + .github/workflows/nightly-build.yml | 29 +++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 .github/workflows/nightly-build.yml diff --git a/.github/workflows/all-checks.yml b/.github/workflows/all-checks.yml index 51efe0e4db..5fe306d018 100644 --- a/.github/workflows/all-checks.yml +++ b/.github/workflows/all-checks.yml @@ -1,6 +1,7 @@ name: Run all checks on Kedro on: + workflow_call: push: branches: - main diff --git a/.github/workflows/nightly-build.yml b/.github/workflows/nightly-build.yml new file mode 100644 index 0000000000..1feb48d9cc --- /dev/null +++ b/.github/workflows/nightly-build.yml @@ -0,0 +1,29 @@ +name: Run nightly tests on Kedro + +on: + workflow_dispatch: + schedule: + # Run every day at midnight (UTC time) + - cron: '0 0 * * *' + +jobs: + kedro-test: + uses: ./.github/workflows/all-checks.yml + + notify-kedro: + permissions: + issues: write + name: Notify failed build for kedro + needs: kedro-test + if: ${{ !success() }} + runs-on: ubuntu-latest + steps: + - uses: jayqi/failed-build-issue-action@v1 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + label-name: "nightly build" + title-template: "ci: Nightly build failure" + body-template: | + GitHub Actions workflow [{{workflow}} #{{runNumber}}](https://github.com/{{repo.owner}}/{{repo.repo}}/actions/runs/{{runId}}) failed. + create-label: true + always-create-new-issue: false