Skip to content

Commit

Permalink
Make CI run with weekly cron job. (#414)
Browse files Browse the repository at this point in the history
* Blindly add CI chat gpt output!

* Add obvious error for testing purposes.

* Add pull request for testing.

* Only create single issue if any CI fails.

* Remove automated issue raising.

* Add note on what branches it runs.

* Remove the  divide by zero error introduced for testing.

* Try and use just one job.

* Fix file.

* Quick test cronning every 1 minuite!

* Oh yea no way to test because it only runs on main. In that case, push and hope!

* Delete unused old test file.
  • Loading branch information
JoeZiminski authored Sep 30, 2024
1 parent 4a58b84 commit 3223577
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/code_test_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ on:
tags:
- '*'
pull_request:
schedule:
# Weekly cron job at 12:00 AM UTC on Mondays.
# This will only run on main by default.
- cron: '0 0 * * 1'

jobs:
linting:
Expand All @@ -25,9 +29,12 @@ jobs:

strategy:
matrix:
# macos-14 is M1, macos-13 is intel
# macos-14 is M1, macos-13 is intel. Run on earliest and
# latest python versions. All python versions are tested in
# the weekly cron job.
os: [windows-latest, ubuntu-latest, macos-14, macos-13]
python-version: ["3.9", "3.10", "3.11", "3.12"]
# Test all Python versions for cron job, and only first/last for other triggers
python-version: ${{ fromJson(github.event_name == 'schedule' && '["3.9", "3.10", "3.11", "3.12"]' || '["3.9", "3.12"]') }}

steps:
- uses: actions/checkout@v4
Expand Down

0 comments on commit 3223577

Please sign in to comment.