Skip to content

ci: add Build Test workflow as the required status check#34

Merged
JohnRDOrazio merged 1 commit intomainfrom
ci/add-build-test-workflow
May 2, 2026
Merged

ci: add Build Test workflow as the required status check#34
JohnRDOrazio merged 1 commit intomainfrom
ci/add-build-test-workflow

Conversation

@JohnRDOrazio
Copy link
Copy Markdown
Member

Summary

Adds .github/workflows/build-test.yml — a CI workflow that runs the build half of deploy-docs.yml (pandoc setup, npm ci, build:html, build:pdf) on every PR and on push to main. Catches the failure modes that currently only surface at deploy time:

  • Lockfile drift (npm ci fails)
  • Pandoc / lua filter errors (build:html fails)
  • PDF rendering / pagedjs / Chrome failures (build:pdf fails)

The deploy-only steps — WordPress REST upload, translation worker, GitHub release — aren't exercised here; they need live external services and only run on tag.

Why this instead of running Lint Markdown on every PR

Lint Markdown is path-filtered to **/*.md for good reason: it's irrelevant to PRs that don't touch markdown (e.g. Dependabot bumping a workflow SHA). Removing its path filter would have given us the required-check anchor for branch protection but at the cost of a useless 30-second job on every Dependabot PR. A build test is more meaningful: it actually validates that the PR doesn't break what main is supposed to ship.

Follow-up after merge

Once this lands and runs once on a PR (so the check name Build governance docs is registered in the API), enable branch protection on main:

  • Require pull request before merging
  • Require Build governance docs status check to pass
  • Block force-push and branch deletion

With that in place, the dependabot auto-merge workflow's gh pr merge --auto --merge will reliably have a check to wait on, fixing the residual race seen on PR #28.

Test plan

  • Verify Build Test runs on this PR and succeeds
  • After merge, enable branch protection on main per above
  • Confirm next Dependabot PR's auto-merge enables cleanly (--auto finds the required check)

Mirrors the build half of deploy-docs.yml — pandoc setup, npm ci,
build:html, build:pdf — running unconditionally on every PR and on
push to main. This serves two purposes:

1. Catch lockfile drift, pandoc/lua filter errors, and pagedjs/Chrome
   PDF rendering failures before they reach a tag-triggered deploy,
   which is the only path that currently exercises these scripts.
2. Provide a stable required status check for branch protection on
   main, including on Dependabot PRs that don't touch markdown (and
   so don't trigger the path-filtered Markdown Lint workflow). With a
   required check in place, 'gh pr merge --auto' in the dependabot
   auto-merge workflow has something to wait on instead of failing
   with 'Pull request Protected branch rules not configured'.

WordPress upload, translation, and GitHub release steps are not
exercised — they require live external services and run only on tag.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@JohnRDOrazio JohnRDOrazio merged commit 8a6d154 into main May 2, 2026
2 checks passed
@JohnRDOrazio JohnRDOrazio deleted the ci/add-build-test-workflow branch May 2, 2026 03:09
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.

1 participant