Run the unit test suite in GitHub Actions - #33
Open
dmccoystephenson wants to merge 1 commit into
Open
dmccoystephenson wants to merge 1 commit into
dmccoystephenson wants to merge 1 commit into
Conversation
Adds a Tests workflow that installs pygame, syntax-checks the top-level modules and runs `python -m unittest discover -s tests` on pull requests to main and pushes to main. The Viron submodule is not checked out, as the suite stubs it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
|
Self-review rubric (the anchor is the workflow's own first run: https://github.com/Preponderous-Software/patchwork/actions/runs/36685845233 —
Findings:
Merge hold: This review comment was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener). drafted by Claude on behalf of Daniel Stephenson |
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
TestsGitHub Actions workflow is added at.github/workflows/tests.yml. It runs on pull requests targetingmainand on pushes tomain, installspygameon Python 3.12, syntax-checks the top-level modules withpy_compile, and runspython -m unittest discover -s tests.Vironsubmodule, as proposed in Add CI to run the unit test suite on pull requests #17: the suite stubs Viron insys.modules, so the submodule is not needed.pushtrigger onmaingoes beyond the issue's pull-request-only proposal. It is included so thatmainaccumulates a run history against which PR results can be compared. It can be dropped if unwanted.py_compilelist differs from the one in Add CI to run the unit test suite on pull requests #17:render_window_example.pyno longer exists in the tree, andheadless_run.py,usage_reporting.pyandtrace_client.py, which have been added since, are included.README.md("Running the tests") now mentions the workflow.Closes #17
Test plan
python3 -m unittest discover -s testsrun locally (Python 3.8.10):Ran 106 tests,OKpython3 -m py_compile main.py graphik.py __init__.py render_window.py headless_run.py usage_reporting.py trace_client.pypasses locallyMerge note
.github/workflows/*is on this loop's do-not-auto-merge list, and #17 itself anticipates human review. This PR is therefore left open for the owner to merge; it is not auto-merged.Deferred issues
This PR description was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener).
🤖 Generated with Claude Code
drafted by Claude on behalf of Daniel Stephenson