ci: add GitHub Actions workflow to run pytest on PRs#405
Merged
Conversation
Add .github/workflows/test.yml. One job, pytest, matrix over Python 3.10 / 3.11 / 3.12 / 3.13 (matching the `python = "^3.10"` constraint in pyproject.toml). Triggers on every pull request and every push to master. The workflow: - Sets up the matrix Python version (with pip cache). - pip install -e . to install runtime deps via the pyproject poetry-core build backend. - pip install pytest mock (test deps not in the main install set). - pytest tests/ --ignore=tests/e2e (the e2e tests need Docker + KVM and won't run on GitHub-hosted runners). - fail-fast: false so one Python version's failure doesn't mask the others. This is the first CI on the repo. The unit tests under tests/ now have an automated gate before changes land on master.
This was referenced May 16, 2026
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.
Adds
.github/workflows/test.yml— the first CI on the repository.What it does
pytest tests/ --ignore=tests/e2eon every pull request and every push to master.python = "^3.10"constraint inpyproject.toml).fail-fast: falseso a failure on one Python version doesn't hide failures on the others.actions/setup-python@v5withcache: pipso repeat runs are fast.What it does NOT do (intentional scope limits)
black --check— the tree is not currently black-formatted (14 files would change). Adding the gate without a separate reformat PR would break master on day one. Reformat is its own discussion.tests/e2e/) — those need a real Docker daemon + KVM, neither available on GitHub-hosted runners. A self-hosted runner with KVM is a follow-up.cd js && npm run build) — currently passing per Refresh js/package-lock.json with compatible bumps #398, but needs a node container in the workflow. Worth its own focused PR.bash -n+shellcheckagainst renderedlaunch-emulator.sh) — would catch the kind of bug we hit manually in earlier PRs. Needs a small Python harness; worth its own PR.Test plan
python -c "import yaml; yaml.safe_load(open(...))").tests/pass locally on Python 3.12.pip install -e .works against the currentpyproject.toml(already in daily use viaconfigure.sh).