From da103a13610cca958dcf98341d7d82b3b6280c4a Mon Sep 17 00:00:00 2001 From: Peter Corke Date: Sat, 26 Sep 2026 18:57:41 -0400 Subject: [PATCH] ci: add GitHub Actions workflows -- fast tests on push/PR, slow suite weekly RVC3-python had no real CI at all -- only GitHub's automatic dependency- graph workflow, no .github/dependabot.yml, and zero check-runs on main. The repo's own test suite (fast unit tests, plus the notebook/example suite gated behind --runall) has only ever been run by hand; every fix landed this cycle (the test_pose2d typo, the clean-install dependency gaps in #49) was only ever caught that way. ci.yml: runs `pytest` (the fast subset; slow-marked notebook/example tests are skipped by default per tests/conftest.py) on push/PR to main, across the full declared Python 3.10-3.14 support matrix. weekly-notebooks.yml: runs `pytest --runall` (every chapter notebook + RVC3/examples script) on a schedule instead of gating every push -- real matplotlib rendering across 16+ notebooks is too slow for that. Deliberately a separate workflow rather than folded into ci.yml, so a slow-suite failure doesn't block merges or flip the main CI badge -- it's meant to be a weekly signal to notice, not a merge gate. Timed (19:13 UTC Friday) to finish with real margin before the Saturday- morning (Brisbane) ecosystem-scan routines at 22:45/23:00 UTC Friday, in case either reads per-repo CI status. Also uploads the per-notebook report tests/reports/latest.md (already written by test_notebooks.py) as a build artifact. Co-Authored-By: Claude Sonnet 5 --- .github/workflows/ci.yml | 31 ++++++++++++++++++++ .github/workflows/weekly-notebooks.yml | 39 ++++++++++++++++++++++++++ 2 files changed, 70 insertions(+) create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/weekly-notebooks.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..c5619ea --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,31 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + branches: [main] + workflow_dispatch: + +jobs: + test: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] + + steps: + - uses: actions/checkout@v7 + + - uses: actions/setup-python@v7 + with: + python-version: ${{ matrix.python-version }} + + - name: Install package + run: pip install -e ".[dev]" + + - name: Run fast tests + env: + MPLBACKEND: Agg + run: pytest diff --git a/.github/workflows/weekly-notebooks.yml b/.github/workflows/weekly-notebooks.yml new file mode 100644 index 0000000..7f67e37 --- /dev/null +++ b/.github/workflows/weekly-notebooks.yml @@ -0,0 +1,39 @@ +name: Weekly notebook/example suite + +# Runs the slow suite (every chapter notebook + RVC3/examples script) on a +# schedule rather than on every push/PR -- real matplotlib rendering across +# 16+ notebooks is too slow to gate normal development on. Timed to finish +# well before the Saturday-morning (Brisbane) ecosystem scan routines, which +# run at 22:45 and 23:00 UTC Friday -- see the tracking issue those post to. +on: + schedule: + - cron: '13 19 * * 5' # 19:13 UTC Friday = 05:13 Brisbane Saturday + workflow_dispatch: + +jobs: + test: + runs-on: ubuntu-latest + timeout-minutes: 60 + + steps: + - uses: actions/checkout@v7 + + - uses: actions/setup-python@v7 + with: + python-version: "3.12" + + - name: Install package + run: pip install -e ".[dev]" + + - name: Run full suite (notebooks + examples) + env: + MPLBACKEND: Agg + run: pytest --runall + + - name: Upload notebook test report + if: always() + uses: actions/upload-artifact@v4 + with: + name: notebook-test-report + path: tests/reports/latest.md + if-no-files-found: ignore