From 3584a6b1127cd0b04fccf2d61c1cbbefb37ea5de Mon Sep 17 00:00:00 2001 From: Eric Hansen Date: Wed, 27 May 2026 15:58:21 -0500 Subject: [PATCH] ci: run audit-orphans.sh on every PR + weekly cron Lock in the stewardship invariant introduced in #7 by running the orphan audit automatically instead of relying on manual memory. The workflow runs on pull requests to main, on a weekly Monday 09:00 UTC cron, and via manual dispatch. It checks out q2mm-data plus the q2mm sibling repo and runs scripts/audit-orphans.sh against that checkout. Smoke tests: validated the workflow YAML with python3 yaml.safe_load; confirmed the audit passes with no orphans, fails after adding benchmarks/_smoke_orphan/scratch, and passes again after removing the smoke directory. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/audit-orphans.yml | 22 ++++++++++++++++++++++ README.md | 7 ++++++- 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/audit-orphans.yml diff --git a/.github/workflows/audit-orphans.yml b/.github/workflows/audit-orphans.yml new file mode 100644 index 0000000..4a40e1b --- /dev/null +++ b/.github/workflows/audit-orphans.yml @@ -0,0 +1,22 @@ +name: Audit orphaned benchmark data + +on: + pull_request: + branches: [main] + schedule: + - cron: "0 9 * * 1" + workflow_dispatch: + +jobs: + audit: + runs-on: ubuntu-latest + permissions: + contents: read + steps: + - uses: actions/checkout@v4 + - uses: actions/checkout@v4 + with: + repository: ericchansen/q2mm + ref: master + path: q2mm-sibling + - run: bash scripts/audit-orphans.sh "${GITHUB_WORKSPACE}/q2mm-sibling" diff --git a/README.md b/README.md index f467bfd..27fba2b 100644 --- a/README.md +++ b/README.md @@ -71,7 +71,8 @@ For this repo specifically: (documentation, paper figure, regression test) belong here. Run `scripts/audit-orphans.sh` (see below) periodically to catch any -directories that have lost their references. +directories that have lost their references. The same audit now runs +automatically on every pull request and weekly on Mondays. ## Auditing for orphaned data @@ -80,6 +81,10 @@ directories that have lost their references. scripts/audit-orphans.sh ../q2mm ``` +The audit also runs automatically in +[Audit orphaned benchmark data](.github/workflows/audit-orphans.yml) on every +pull request, weekly on Mondays at 09:00 UTC, and on manual dispatch. + The script walks every `benchmarks///` and searches the q2mm checkout (`docs/`, `test/`, `q2mm/`, `scripts/`, `examples/`) for references to that path. Any subdirectory without a reference is