Skip to content

ci: add GitHub Actions workflow to run pytest on PRs#405

Merged
jpcottin merged 1 commit into
google:masterfrom
jpcottin:fix/add-github-actions-ci
May 16, 2026
Merged

ci: add GitHub Actions workflow to run pytest on PRs#405
jpcottin merged 1 commit into
google:masterfrom
jpcottin:fix/add-github-actions-ci

Conversation

@jpcottin
Copy link
Copy Markdown
Collaborator

Adds .github/workflows/test.yml — the first CI on the repository.

What it does

  • Runs pytest tests/ --ignore=tests/e2e on every pull request and every push to master.
  • Matrix across Python 3.10 / 3.11 / 3.12 / 3.13 (matches the python = "^3.10" constraint in pyproject.toml).
  • fail-fast: false so a failure on one Python version doesn't hide failures on the others.
  • actions/setup-python@v5 with cache: pip so 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.
  • e2e tests (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.
  • JS build smoke (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.
  • Template render check (bash -n + shellcheck against rendered launch-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

  • YAML parses (python -c "import yaml; yaml.safe_load(open(...))").
  • All unit tests under tests/ pass locally on Python 3.12.
  • pip install -e . works against the current pyproject.toml (already in daily use via configure.sh).

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.
@jpcottin jpcottin merged commit 346a2f1 into google:master May 16, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant