Adds the CI workflow, .gitea/workflows/ci.yml: tests, ruff check, ruff format --check and mypy on every push and pull request, with Python 3.13 on ubuntu-latest.
Two things in the first draft would have failed, and are fixed here:
The dev tools were never installed. The draft ran pip install -e ".[dev]", but pyproject.toml declares the dev tools as a dependency group, not an extra. pip only warns ("does not provide the extra 'dev'") and exits 0, so pytest, ruff and mypy were missing and the first step died with "No module named pytest". The workflow now runs pip install -e . --group dev.
A CI runner has no display. 10 of the 40 test cases open a hidden Tk window. The workflow now installs xvfb and python3-tk and runs the tests with xvfb-run -a python -m pytest, so the display requirement accepted on RC-006 still holds. No test code changes.
Checked
Locally, in clean scratch environments:
The YAML parses to the eight intended steps.
The install line gives pytest, ruff and mypy.
The test, lint, format and type commands pass as written: 40 tests, no ruff finding, no mypy finding.
Not checked yet
The Linux-only steps (apt-get, xvfb, python3-tk, xvfb-run) cannot run on the machine this was written on. This pull request is their first real run. If the runner image differs from the assumption (no apt, no sudo, Tk already present or missing), that is where it will show.
Because the workflow triggers on both push and pull_request, it runs twice for each push to a branch with an open PR. Restricting push to main would avoid that; it is left as the author wrote it.
Only .gitea/workflows/ci.yml is added.
Issues
No issue closed: CI configuration that no task of MIL-001 or MIL-002 covers.
## Summary
Adds the CI workflow, `.gitea/workflows/ci.yml`: tests, `ruff check`, `ruff format --check` and `mypy` on every push and pull request, with Python 3.13 on `ubuntu-latest`.
Two things in the first draft would have failed, and are fixed here:
- **The dev tools were never installed.** The draft ran `pip install -e ".[dev]"`, but `pyproject.toml` declares the dev tools as a dependency group, not an extra. pip only warns ("does not provide the extra 'dev'") and exits 0, so pytest, ruff and mypy were missing and the first step died with "No module named pytest". The workflow now runs `pip install -e . --group dev`.
- **A CI runner has no display.** 10 of the 40 test cases open a hidden Tk window. The workflow now installs `xvfb` and `python3-tk` and runs the tests with `xvfb-run -a python -m pytest`, so the display requirement accepted on RC-006 still holds. No test code changes.
## Checked
Locally, in clean scratch environments:
- The YAML parses to the eight intended steps.
- The install line gives pytest, ruff and mypy.
- The test, lint, format and type commands pass as written: 40 tests, no ruff finding, no mypy finding.
## Not checked yet
The Linux-only steps (`apt-get`, `xvfb`, `python3-tk`, `xvfb-run`) cannot run on the machine this was written on. This pull request is their first real run. If the runner image differs from the assumption (no `apt`, no `sudo`, Tk already present or missing), that is where it will show.
Because the workflow triggers on both `push` and `pull_request`, it runs twice for each push to a branch with an open PR. Restricting `push` to `main` would avoid that; it is left as the author wrote it.
Only `.gitea/workflows/ci.yml` is added.
## Issues
No issue closed: CI configuration that no task of MIL-001 or MIL-002 covers.
Add .gitea/workflows/ci.yml: tests, ruff check, ruff format --check and mypy on
every push and pull request, with Python 3.13 on ubuntu-latest.
Two things in the first draft would have failed:
- It installed the dev tools with `pip install -e ".[dev]"`, but the project
declares them as a dependency group, not an extra. pip only warns and exits 0,
so pytest, ruff and mypy were missing and the first step died with "No module
named pytest". It now runs `pip install -e . --group dev`.
- The 10 test cases that use Tk need a display, which a CI runner does not have.
The workflow now installs xvfb and python3-tk and runs the tests with
xvfb-run, so the display requirement accepted on RC-006 still holds. No test
code changes.
Checked locally: the YAML parses to the intended eight steps, the install line
gives all three tools in a clean environment, and the test, lint, format and
type commands pass as written. The Linux display steps have not run yet; they
need a runner.
Tirsvad
merged commit d376875d72 into main2026-10-07 19:22:33 +02:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
Adds the CI workflow,
.gitea/workflows/ci.yml: tests,ruff check,ruff format --checkandmypyon every push and pull request, with Python 3.13 onubuntu-latest.Two things in the first draft would have failed, and are fixed here:
pip install -e ".[dev]", butpyproject.tomldeclares the dev tools as a dependency group, not an extra. pip only warns ("does not provide the extra 'dev'") and exits 0, so pytest, ruff and mypy were missing and the first step died with "No module named pytest". The workflow now runspip install -e . --group dev.xvfbandpython3-tkand runs the tests withxvfb-run -a python -m pytest, so the display requirement accepted on RC-006 still holds. No test code changes.Checked
Locally, in clean scratch environments:
Not checked yet
The Linux-only steps (
apt-get,xvfb,python3-tk,xvfb-run) cannot run on the machine this was written on. This pull request is their first real run. If the runner image differs from the assumption (noapt, nosudo, Tk already present or missing), that is where it will show.Because the workflow triggers on both
pushandpull_request, it runs twice for each push to a branch with an open PR. Restrictingpushtomainwould avoid that; it is left as the author wrote it.Only
.gitea/workflows/ci.ymlis added.Issues
No issue closed: CI configuration that no task of MIL-001 or MIL-002 covers.