ci: run tests on push and pull request#14
Conversation
Only a tag-triggered publish workflow existed; there was no CI signal on ordinary pushes/PRs, so regressions relied entirely on manual local validation. Add a test workflow that compiles, import-smoke-tests, and runs the headless pytest suite, and declare pytest as a test extra so CI installs it via the package's own metadata. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
Self-review rubric:
Repo-specific:
Summary: adds the missing push/PR test signal (only a tag-triggered publish workflow existed before); no production code touched, all rubric items pass or are N/A for this change type. Issue #5 (packaging/release) is deliberately not addressed here — its remaining steps are a manual PyPI account action and cross-repo consumer migrations, both outside this PR's scope; noted in the PR body. |
|
Independent review pass (inline, via the review skill — no external reviewer available in this dispatch): Overview: Adds Findings: No blocking issues.
No changes requested. Manual validation remains green (py_compile, import smoke test, pytest 14/14). |
python-version: "3.x" resolves to the latest interpreter (3.14 on the runner), but pygame 2.6.1 only ships prebuilt wheels through cp313. Installing on 3.14 forced pip to build pygame from source, which failed because the runner lacks SDL/freetype dev headers (sdl-config not found). Pinning to 3.13 uses the existing prebuilt wheel instead. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
Self-review: fixed CI failure by pinning python-version to 3.13 (pygame has no cp314 wheel yet). Verified locally with pytest -q (14 passed); Compile and test check on this PR is now green. Filed #15 for the same latent issue in publish.yml (out of scope here). |
Summary
.github/workflows/test.yml: compilesgraphik.py, runs an import smoke test, and runs the headless pytest suite (SDL_VIDEODRIVER=dummy) on every push tomainand every pull request.testoptional-dependency group (pytest) topyproject.tomlso CI installs test tooling viapip install -e .[test]instead of a hardcodedpip install pytestline.Why
The repo has a robust pytest suite (
src/test/python/..., 14 tests) and a tag-triggeredpublish.yml, but no workflow runs on ordinary pushes/PRs — regressions were only caught by manual local validation (py_compile+pytest), which this dev-loop cycle already runs by hand every PR. This gives the same signal automatically and to human reviewers/other contributors.Scope note
Issue #5 ("Package graphik for proper release & distribution") is intentionally not touched by this PR. Its remaining steps — claiming the
graphikname on PyPI (a manual maintainer account action) and migrating downstream consumers (Roam, Apex, Ophidian, Patchwork, Tic-Tak-Toe) off vendored copies (cross-repo follow-ups) — are both outside what this loop can do unilaterally in this repo, per the issue's own latest comment. Left open, no action taken this cycle.Test plan
python3 -m py_compile src/main/python/preponderous/graphik/graphik.pypython3 -c "import preponderous.graphik as g; print(g.__version__)"python3 -m pytest -q→ 14 passedtest.ymlagainstpublish.yml's existing conventions (permissions: contents: read, actions/checkout@v4, actions/setup-python@v5)