Skip to content

Add pytest-regtest snapshot tests for notifications workflow - #195

Merged
max-sixty merged 7 commits into
mainfrom
notif-regtest
Apr 9, 2026
Merged

max-sixty merged 7 commits into
mainfrom
notif-regtest

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

Adds pytest-regtest snapshot tests that capture the full generated YAML for the notifications workflow under two configs: minimal (no setup steps) and with a setup step (astral-sh/setup-uv@v6). Changes to the generator now show up as diffs in the .out files, making review straightforward.

Also adds a conftest.py with a pre-converter to handle pytest-regtest's binary detection rejecting the em dash (U+2014) in the workflow header.

This was written by Claude Code on behalf of @max-sixty

max-sixty and others added 7 commits April 8, 2026 15:47
Bumps generator version to 0.0.8 and syncs lockfile. The tag push triggers the PyPI release workflow.

1 commit since 0.0.7: token usage measurement and reporting (#188).

Co-Authored-By: Claude <[email protected]>
Adds model config (opus) to all workflows and updates mention/triage logic.

Co-Authored-By: Claude <[email protected]>
The notifications workflow now checks for unread notifications before
invoking Claude. A new step queries the GitHub API for notification count
and stores it in `steps.check.outputs.count`. All subsequent steps are
conditionally gated on either having unread notifications or being
manually triggered via workflow_dispatch, preventing unnecessary Claude
invocations when there's nothing to process. The _setup_yaml function
accepts an optional condition parameter to apply if-guards to setup
steps, with a warning for raw steps that cannot be conditionally skipped.
@max-sixty
max-sixty merged commit 3821f5a into main Apr 9, 2026
5 checks passed
@max-sixty
max-sixty deleted the notif-regtest branch April 9, 2026 00:13
max-sixty added a commit that referenced this pull request Apr 9, 2026
Extends the regtest snapshot tests from #195 (notifications-only) to
cover all 8 workflow generators. Uses `@pytest.mark.parametrize` over
the `GENERATORS` dict — 16 test cases total (8 workflows ×
minimal/with-setup configs). Adding a new generator to the dict
automatically gets snapshot coverage.

> _This was written by Claude Code on behalf of @max-sixty_

Co-authored-by: Claude <[email protected]>
max-sixty added a commit that referenced this pull request Apr 9, 2026
Bumps generator version to 0.0.10 and syncs lockfile.

10 commits since 0.0.9: fix tend-mention on fork PRs (#206), add notifications:read to PAT scopes (#205), improve install-tend skill (#207), document org membership for bot accounts (#204), expand regtest snapshots (#199, #195), simplify nightly survey (#200), add release skill (#198), move tend upgrade to nightly skill (#197).

Co-Authored-By: Claude <[email protected]>
@max-sixty max-sixty mentioned this pull request Apr 9, 2026
max-sixty added a commit that referenced this pull request Apr 9, 2026
## Summary

- Bump generator version to 0.0.10 and sync lockfile

10 commits since 0.0.9: fix tend-mention on fork PRs (#206), add
notifications:read to PAT scopes (#205), improve install-tend skill
(#207), document org membership for bot accounts (#204), expand regtest
snapshots (#199, #195), simplify nightly survey (#200), add release
skill (#198), move tend upgrade to nightly skill (#197).

> _This was written by Claude Code on behalf of Maximilian Roos_

Co-authored-by: Claude <[email protected]>
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