Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: CI
on: [push, pull_request]
jobs:
test:
strategy:
matrix:
pg: [17, 16, 15, 14, 13, 12, 11, 10, 9.6, 9.5, 9.4, 9.3]
name: 🐘 PostgreSQL ${{ matrix.pg }}
runs-on: ubuntu-latest
container: pgxn/pgxn-tools
steps:
- name: Start PostgreSQL ${{ matrix.pg }}
run: pg-start ${{ matrix.pg }}
- name: Check out the repo
uses: actions/checkout@v4
- name: Test on PostgreSQL ${{ matrix.pg }}
run: pg-build-test
10 changes: 8 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
# Editor files
.*.swp

# Claude Code local settings
.claude/*.local.json

# Explicitly exclude META.json!
!/META.json

# Generated make files
meta.mk
control.mk

# Compiler output
*.o
*.so
.deps/

# built targets
/sql/*--*
!/sql/*--*--*.sql
# Note: Version-specific files (sql/*--*.sql) are now tracked in git and should be committed

# Test artifacts
results/
Expand All @@ -24,3 +27,6 @@ regression.out
# Misc
tmp/
.DS_Store

# pg_tle generated files
/pg_tle/
12 changes: 0 additions & 12 deletions .travis.yml

This file was deleted.

36 changes: 0 additions & 36 deletions pg-travis-test.sh

This file was deleted.

78 changes: 78 additions & 0 deletions pgxntool/.claude/commands/commit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
---
description: Create a git commit following project standards and safety protocols
allowed-tools: Bash(git status:*), Bash(git log:*), Bash(git add:*), Bash(git diff:*), Bash(git commit:*), Bash(make test:*)
---

# commit

Create a git commit following all project standards and safety protocols for pgxntool-test.

**CRITICAL REQUIREMENTS:**

1. **Git Safety**: Never update `git config`, never force push to `main`/`master`, never skip hooks unless explicitly requested

2. **Commit Attribution**: Do NOT add "Generated with Claude Code" to commit message body. The standard Co-Authored-By trailer is acceptable per project CLAUDE.md.

3. **Testing**: ALL tests must pass before committing:
- Run `make test`
- Check the output carefully for any "not ok" lines
- Count passing vs total tests
- **If ANY tests fail: STOP. Do NOT commit. Ask the user what to do.**
- There is NO such thing as an "acceptable" failing test
- Do NOT rationalize failures as "pre-existing" or "unrelated"

**WORKFLOW:**

1. Run in parallel: `git status`, `git diff --stat`, `git log -10 --oneline`

2. Check test status - THIS IS MANDATORY:
- Run `make test 2>&1 | tee /tmp/test-output.txt`
- Check for failing tests: `grep "^not ok" /tmp/test-output.txt`
- If ANY tests fail: STOP immediately and inform the user
- Only proceed if ALL tests pass

3. Analyze changes and draft concise commit message following this repo's style:
- Look at `git log -10 --oneline` to match existing style
- Be factual and direct (e.g., "Fix BATS dist test to create its own distribution")
- Focus on "why" when it adds value, otherwise just describe "what"
- List items in roughly decreasing order of impact
- Keep related items grouped together
- **In commit messages**: Wrap all code references in backticks - filenames, paths, commands, function names, variables, make targets, etc.
- Examples: `helpers.bash`, `make test-recursion`, `setup_sequential_test()`, `TEST_REPO`, `.envs/`, `01-meta.bats`
- Prevents markdown parsing issues and improves clarity

4. **PRESENT the proposed commit message to the user and WAIT for approval before proceeding**

5. After receiving approval, stage changes appropriately using `git add`

6. **VERIFY staged files with `git status`**:
- If user did NOT specify a subset: Confirm ALL modified/untracked files are staged
- If user specified only certain files: Confirm ONLY those files are staged
- STOP and ask user if staging doesn't match intent

7. After verification, commit using `HEREDOC` format:
```bash
git commit -m "$(cat <<'EOF'
Subject line (imperative mood, < 72 chars)

Additional context if needed, wrapped at 72 characters.

Co-Authored-By: Claude <noreply@anthropic.com>
EOF
)"
```

8. Run `git status` after commit to verify success

9. If pre-commit hook modifies files: Check authorship (`git log -1 --format='%an %ae'`) and branch status, then amend if safe or create new commit

**REPOSITORY CONTEXT:**

This is pgxntool-test, a test harness for the pgxntool framework. Key facts:
- Tests live in `tests/` directory
- `.envs/` contains test environments (gitignored)

**RESTRICTIONS:**
- DO NOT push unless explicitly asked
- DO NOT commit files with actual secrets (`.env`, `credentials.json`, etc.)
- Never use `-i` flags (`git commit -i`, `git rebase -i`, etc.)
19 changes: 19 additions & 0 deletions pgxntool/.claude/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"permissions": {
"allow": [
"Bash(cat:*)",
"Bash(make test:*)",
"Bash(tee:*)",
"Bash(echo:*)",
"Bash(git show:*)",
"Bash(git log:*)",
"Bash(ls:*)",
"Bash(find:*)",
"Bash(git checkout:*)",
"Bash(head:*)"
],
"additionalDirectories": [
"../pgxntool-test/"
]
}
}
3 changes: 3 additions & 0 deletions pgxntool/.gitattributes
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
.gitattributes export-ignore
.claude/ export-ignore
*.md export-ignore
.DS_Store export-ignore
*.asc export-ignore
*.adoc export-ignore
*.html export-ignore
1 change: 1 addition & 0 deletions pgxntool/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.*.swp
.claude/*.local.json
Loading