From 588cddb105d9cb81bdbfb541a6d0bf84a2fd3cff Mon Sep 17 00:00:00 2001 From: Alessandro Felder Date: Fri, 10 Nov 2023 09:19:23 +0000 Subject: [PATCH] Run CI weekly on `main` (#92) --- .github/workflows/README.md | 3 +++ .github/workflows/test.yml | 11 ++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/README.md diff --git a/.github/workflows/README.md b/.github/workflows/README.md new file mode 100644 index 0000000..1578132 --- /dev/null +++ b/.github/workflows/README.md @@ -0,0 +1,3 @@ +## Weekly scheduled run + +Tests are run on the `main` branch of the original fork of this repository on a weekly schedule, to ensure the cookiecutter template does not have outdated dependencies. diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 22bc31b..b40cb8e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,8 +1,17 @@ name: tests -on: [push, pull_request] +on: + push: + pull_request: + workflow_dispatch: # for occasional debugging + schedule: + # Every Sunday at 3 AM + - cron: "0 3 * * 0" + jobs: linting: + # scheduled workflows should not run on forks + if: (${{ github.event_name == 'schedule' }} && ${{ github.repository_owner == 'neuroinformatics-unit' }} && ${{ github.ref == 'refs/heads/main' }}) || (${{ github.event_name != 'schedule' }}) runs-on: ubuntu-latest steps: - uses: neuroinformatics-unit/actions/lint@v1