Repository navigation
ci: add GitHub Actions test workflow - #21
Merged
Merged
Conversation
1 of 2 tasks
The repo had no CI: every merge (20 PRs so far, including the full monolith->hexstrike/ package migration) relied on contributors remembering to run pytest by hand before merging, with no automated gate on push/PR. requirements.txt also didn't declare pytest, so a fresh clone following the README's install instructions couldn't run tests/ at all. Adds: - .github/workflows/tests.yml: runs on push to master and on PRs against master, Python 3.11, `pip install -r requirements.txt -r requirements-dev.txt` then `pytest tests/ -v`. - requirements-dev.txt: test-only deps (currently just pytest), installed alongside requirements.txt rather than folded into it, so production installs don't pull in test tooling. - README: adds a Tests badge and a "Running Tests" section documenting the new install/run commands. Verified end-to-end in a scratch venv outside the repo: fresh `pip install -r requirements.txt -r requirements-dev.txt` followed by `pytest tests/ -v` reaches 228/228 passing, matching what the new workflow will do on GitHub. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UCXzPVYGQRPh8iwyajTsRt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
pytestbefore merging. Adds.github/workflows/tests.ymlto run the suite automatically on every push tomasterand every PR targetingmaster(Python 3.11,pip install -r requirements.txt -r requirements-dev.txtthenpytest tests/ -v).requirements.txtnever declaredpytest, so a fresh clone following the README's install steps couldn't runtests/at all. Addsrequirements-dev.txt(test-only deps, currently justpytest) rather than folding it intorequirements.txt, so production installs stay lean.Test plan
.venv): freshpip install -r requirements.txt -r requirements-dev.txtfollowed bypytest tests/ -v→ 228/228 passing, matching exactly what the new workflow doeshexstrike/tools/*.pymodule importsangr/pwntoolsat module level (those only appear inside generated-script string templates), so installing the fullrequirements.txtin CI, while safest against drift, isn't masking an import that would otherwise be optionalactions/checkout+actions/setup-python+ pip install + pytest steps); will confirm green run once this PR is open on GitHub🤖 Generated with Claude Code
https://claude.ai/code/session_01UCXzPVYGQRPh8iwyajTsRt