Hosted CI on the public repository only; local CI script - #15
Merged
Conversation
Actions minutes on the private mirror are billed to the owner's personal account and are nearly exhausted. The CI jobs now run only on Big-Life-Lab/cshm-dev (organization plan) or when started by hand (workflow_dispatch); on the private mirror the workflow is skipped. scripts/ci-local.sh runs the same checks locally (tests, styler check, ci-profile pipeline, protocol render) and fails if any does.
…t manual dispatch - render now runs `quarto render --profile ci` for the whole site and repeats the hosted assertions (_site/index.html present, at least 30 HTML pages). The Word render of the protocol is a separate optional check, protocol-docx, which restores the section-map.json that docstyle rewrites so the worktree stays clean. - An unknown argument exits 2 with a message instead of reporting success. - CLAUDE.md: hosted CI runs automatically only on the public repository; on the private mirror it runs only when started by hand (workflow_dispatch).
… match the pipeline assertions - protocol-docx saves docs/protocol/_docstyle/section-map.json before the Word render and puts the same file back afterwards, so a user's edits survive (the previous git checkout discarded them). - More than one argument exits 2. - pipeline repeats the hosted assertions: no errored target, and every target completed or skipped (tar_progress()).
…TERM/HUP The pre-render copy of docs/protocol/_docstyle/section-map.json is put back by an EXIT trap, so an interrupted Word render still restores it; a failed restoration fails the check and leaves the backup path in the message.
Run hosted CI only on the public repository; local CI script
Contributor
There was a problem hiding this comment.
Pull request overview
This PR limits hosted GitHub Actions CI execution to the public repository (or manual dispatch) to avoid consuming billed runner minutes on private mirrors, and adds a local script to run the same set of CI checks before opening PRs.
Changes:
- Gate CI jobs in
.github/workflows/ci.ymlso they run only onBig-Life-Lab/cshm-devor viaworkflow_dispatch. - Add
scripts/ci-local.shto run tests, style, pipeline (ci profile), and site render locally, plus an optional protocol Word render. - Document the new local CI workflow in
CLAUDE.md.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| scripts/ci-local.sh | New local CI runner script mirroring hosted CI jobs and assertions. |
| CLAUDE.md | Adds documentation for running CI checks locally and notes hosted CI behavior. |
| .github/workflows/ci.yml | Adds job-level if: guards to skip hosted CI on private mirrors unless manually dispatched. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| # it survive and the check leaves the worktree as it found it. | ||
| run protocol-docx bash -c ' | ||
| map=docs/protocol/_docstyle/section-map.json | ||
| bak=$(mktemp) && cp "$map" "$bak" || exit 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hosted CI runs automatically only on this public repository; the private development mirror runs the same checks locally.
.github/workflows/ci.yml: the tests, pipeline, render and style jobs run whengithub.repository == 'Big-Life-Lab/cshm-dev'or on manual dispatch (workflow_dispatch); elsewhere they are skipped. The protocol-version check is unchanged.scripts/ci-local.sh [tests|style|pipeline|render|all|protocol-docx]: the same commands and assertions as the hosted jobs (whole-sitequarto render --profile ciwith the index and 30-page assertions;tar_meta()error scan plustar_progress()all-completed-or-skipped; styler dry run). Unknown or extra arguments exit 2. The optional Word render of the protocol saves and restores the docstyle sidecarsection-map.jsonon any exit, including INT/TERM/HUP.