Skip to content

Hosted CI on the public repository only; local CI script - #15

Merged
DougManuel merged 5 commits into
mainfrom
protocol
Aug 30, 2026
Merged

Hosted CI on the public repository only; local CI script#15
DougManuel merged 5 commits into
mainfrom
protocol

Conversation

@DougManuel

Copy link
Copy Markdown
Collaborator

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 when github.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-site quarto render --profile ci with the index and 30-page assertions; tar_meta() error scan plus tar_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 sidecar section-map.json on any exit, including INT/TERM/HUP.
  • CLAUDE.md documents the split.

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
Copilot AI lite review requested due to automatic review settings August 30, 2026 01:15
@DougManuel
DougManuel merged commit 7d79fda into main Aug 30, 2026
9 checks passed

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.yml so they run only on Big-Life-Lab/cshm-dev or via workflow_dispatch.
  • Add scripts/ci-local.sh to 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.

Comment thread scripts/ci-local.sh
# 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants