Add a CI job running pytest and a minimal lint gate #39
Loading…
Reference in a new issue
No description provided.
Delete branch "add/ci"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Second half of #25: nothing runs the test suite or any lint automatically -- the escape-sequence regexes (#30) and the
conf.ROOTDIRtypo both shipped because nothing was watching.Along the way:
tests/test_scripts_button.pylanded from a branch cut before the pytest conversion and still runs its checks at import time, which breaks collection for the whole suite.Closes #25.
Fix
.forgejo/workflows/ci.yml: every push to trunk and every PR runs, in anarchlinuxjob container (the target platform -- deps mirror the PKGBUILD),ruff check --select E9,F63,F7,F82,compileallwith SyntaxWarning promoted to error, andpytest. Installingopenvpnin the container means the two real-parser tests run in CI instead of skipping.tests/test_aqomui_gui.pyper the CONTRIBUTING layout rule and drops the script.country_translatereadscountries.jsonfrom the installed data dir, so they only passed on a machine with the package installed. CI's clean container caught this on its first run; the fixture now pointsROOTDIRat the checkout'sresources/copy.The lint selection is deliberately the always-a-real-bug class only; the fuller pyflakes set currently has ~70 pre-existing findings, so widening the gate means fixing those first.
Verification
All three gates pass locally (27 tests), in a clean
archlinuxcontainer replicating the job environment, and in CI itself: run 19 on this branch is green on the newaqomui-cirunner. First runs surfaced two real infrastructure/test bugs (job containers couldn't reach the forge through rootless podman's pasta networking -- fixed and documented in the docker repo -- and the installed-data-dir dependency above), so the pipeline has already caught things.eaca712f797981b9dcce7981b9dcceefa350aadc