Skip to content

Commit fe92008

Browse files
brianleachclaude
andauthored
Run the regression suite automatically (CI + SessionStart hook) (#3)
Make the stdlib regression suite (tests/test_fixtures.py) run automatically in both CI and Claude Code on the web, so the classifier->plumbing contract is enforced rather than only checked by hand. - .github/workflows/tests.yml: runs the suite on every push to main and on every PR. No install step — the project is standard-library only. - .claude/hooks/session-start.sh + .claude/settings.json: a SessionStart hook for web sessions. There are no dependencies to install, so instead of an install step it runs the suite as a fast, side-effect-free smoke check so a session starts knowing the fixtures are green. Claude-Session: https://claude.ai/code/session_01SAn8aZTHDrPaKj8BoryGFr Co-authored-by: Claude <noreply@anthropic.com>
1 parent eb4def4 commit fe92008

3 files changed

Lines changed: 49 additions & 0 deletions

File tree

.claude/hooks/session-start.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/bash
2+
# SessionStart hook for Claude Code on the web.
3+
#
4+
# This project is standard-library only — there are no dependencies to install.
5+
# So instead of an install step, we run the offline regression suite as a fast
6+
# smoke check (it is stdlib-only and side-effect free), so the session starts
7+
# knowing the classifier->plumbing contract is green.
8+
set -euo pipefail
9+
10+
cd "${CLAUDE_PROJECT_DIR:-.}"
11+
12+
if ! command -v python3 >/dev/null 2>&1; then
13+
echo "session-start: python3 not found; skipping regression smoke check." >&2
14+
exit 0
15+
fi
16+
17+
python3 tests/test_fixtures.py

.claude/settings.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"hooks": {
3+
"SessionStart": [
4+
{
5+
"hooks": [
6+
{
7+
"type": "command",
8+
"command": "$CLAUDE_PROJECT_DIR/.claude/hooks/session-start.sh"
9+
}
10+
]
11+
}
12+
]
13+
}
14+
}

.github/workflows/tests.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: tests
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
8+
jobs:
9+
fixtures:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
- uses: actions/setup-python@v5
14+
with:
15+
python-version: "3.x"
16+
# No dependencies to install — the project is standard-library only.
17+
- name: Run regression suite
18+
run: python3 tests/test_fixtures.py

0 commit comments

Comments
 (0)