Skip to content

docs: add CI and Contributing section to README#20

Closed
jnasbyupgrade wants to merge 8 commits into
masterfrom
add-ci-docs
Closed

docs: add CI and Contributing section to README#20
jnasbyupgrade wants to merge 8 commits into
masterfrom
add-ci-docs

Conversation

@jnasbyupgrade
Copy link
Copy Markdown
Contributor

@jnasbyupgrade jnasbyupgrade commented May 15, 2026

Implements the cross-repo CI design from #15.

What's added

.github/workflows/ci.yml — CI workflow that:

  • Checks whether pgxntool has a branch with the same name as this PR
  • If yes, runs tests against that pgxntool branch; if no, falls back to pgxntool/master

CLAUDE.md — adds a note asking for confirmation before touching any existing PR not opened in the current session (multiple concurrent Claude sessions are common across these repos)

README.md — explains the cross-repo PR workflow, branch naming convention, and no-test-pr label to contributors

Setup required after merge

  • No special setup needed for this repo

Pairs with: Postgres-Extensions/pgxntool#33

🤖 Generated with Claude Code

Explains the cross-repo PR workflow, branch naming convention,
how the pgxntool CI wait logic works, the no-test-pr label and
its write-protection, and what branch protection enforces.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@jnasbyupgrade
Copy link
Copy Markdown
Contributor Author

Closing in favour of #debug-levels PR which includes these docs alongside the functional changes they describe.

- .github/workflows/ci.yml: test against matching pgxntool branch
  (falls back to master if no matching branch exists)
- CLAUDE.md: warn before touching existing PRs not opened in this session

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
jnasbyupgrade and others added 6 commits May 15, 2026 15:17
git subtree add refuses to work with shallow clones; fails with
"shallow roots are not allowed to be updated" which looks like a
remote/ref problem rather than a depth issue.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- gem install asciidoctor instead of apt ruby-asciidoctor: the apt
  package binary is not on PATH in pgxn-tools containers (diagnosed
  from base.mk: "Could not find asciidoc or asciidoctor")
- Print '=== BRANCHES: ===' line in resolve step so CI logs clearly
  show which pgxntool branch was selected for the run

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Shell-script-driven skill that monitors GitHub Actions runs across both
repos after a push. Key features:
- Uses --commit SHA when available to avoid branch-race-condition
- Fast log API path for BRANCHES line extraction (~1s vs 3-10s zip)
- Parallel monitoring of both repos by default
- Per-job pass/fail summary + failure log tail
- 10-min timeout for pgxntool (accounts for 5-min test-PR wait)
- Prefixes all output with [repo] for readability when interleaved

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The concurrent-make-test.bats test runs two `make test` processes
simultaneously to verify database-name isolation. Both processes check
$(datadir)/extension/pgtap.control and, finding it absent, both invoke
`pgxn install pgtap --sudo` concurrently. Their simultaneous `gmake
install` calls race to write files into the shared
/usr/share/postgresql/<pg>/extension/ directory, producing:

  install: cannot create regular file '.../pgtap--X.Y.Z.sql': File exists
  install: cannot change permissions of '...': No such file or directory

The race is most pronounced on older PostgreSQL versions (e.g. PG13)
where pgtap's build applies more compat patches, widening the window
during which both installs run in parallel.

Fix: add a Pre-install pgtap step before `make test`. With pgtap.control
already present, both concurrent make processes find the Make target's
prerequisite satisfied and skip the install entirely — no race occurs.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Script now prints OVERALL: ALL_PASS/FAIL/TIMEOUT as the last line
- Exit codes: 0=pass, 1=fail, 2=timeout (distinguishable from failure)
- SKILL.md documents the contract with a table so Claude knows exactly
  what to check without parsing the full output

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@jnasbyupgrade jnasbyupgrade deleted the add-ci-docs branch May 15, 2026 21:13
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