2989e8e23e
A branch with an open PR triggered both the push and pull_request events, running every job twice. Trigger on pull_request only; pushes to main are already tested by release.yml's `test` job. No version bump (CI config only). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
45 lines
1.5 KiB
YAML
45 lines
1.5 KiB
YAML
name: tests
|
|
run-name: Run test suite
|
|
|
|
# Runs the unittest suite on pull requests (once per PR). Pushes to main are covered by the
|
|
# `test` job in release.yml, so we don't trigger on push here — that would double every run.
|
|
# Two jobs:
|
|
# core — stdlib-only install; the GUI tests skip (@skipUnless HAVE_QT). Bulletproof.
|
|
# gui-smoke — installs the GUI extra + offscreen Qt libs and runs the same suite headless,
|
|
# exercising the MainWindow/SetupWizard/DiagnosticDialog construction tests.
|
|
# Make `tests / core (pull_request)` a required status check on `main` so a PR can't merge red.
|
|
|
|
on:
|
|
pull_request:
|
|
|
|
jobs:
|
|
core:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.12"
|
|
- name: Install (core only — no PySide6)
|
|
run: python -m pip install -e .
|
|
- name: Run tests (GUI tests skip without PySide6)
|
|
run: python -m unittest discover -s tests -v
|
|
|
|
gui-smoke:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.12"
|
|
- name: System libraries for offscreen Qt
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y libegl1 libgl1 libxkbcommon0 libdbus-1-3 libglib2.0-0
|
|
- name: Install (with GUI extra)
|
|
run: python -m pip install -e ".[gui]"
|
|
- name: Run tests (headless)
|
|
env:
|
|
QT_QPA_PLATFORM: offscreen
|
|
run: python -m unittest discover -s tests -v
|