ci: split the workflow into lint/type/headless/gui/integration jobs
Reconstructs the workflow stripped during the tree copy to match the meta-gates: separate type job, headless command over tests/unit+tests/services, and dedicated GUI / integration jobs. Tool versions pinned to the pre-commit revisions (ruff 0.4.4, mypy 1.10.0) so CI and local hooks agree.
This commit is contained in:
parent
ba3cad4eff
commit
1f39cff5b0
1 changed files with 43 additions and 10 deletions
53
.github/workflows/ci.yml
vendored
53
.github/workflows/ci.yml
vendored
|
|
@ -14,12 +14,25 @@ jobs:
|
||||||
- uses: actions/setup-python@v5
|
- uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: "3.11"
|
python-version: "3.11"
|
||||||
- run: pip install ruff mypy
|
# Pinned to the pre-commit revisions so CI and local hooks agree.
|
||||||
|
- run: pip install ruff==0.4.4
|
||||||
- run: ruff check src tests
|
- run: ruff check src tests
|
||||||
- run: ruff format --check src tests
|
- run: ruff format --check src tests
|
||||||
|
|
||||||
test:
|
type:
|
||||||
needs: lint
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: "3.11"
|
||||||
|
# Pinned to the pre-commit revision (see .pre-commit-config.yaml).
|
||||||
|
- run: pip install mypy==1.10.0 pydantic numpy
|
||||||
|
- run: pip install -e .
|
||||||
|
- run: mypy src/otko/core src/otko/services
|
||||||
|
|
||||||
|
test-headless:
|
||||||
|
needs: [lint, type]
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
|
|
@ -31,8 +44,18 @@ jobs:
|
||||||
- uses: actions/setup-python@v5
|
- uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: ${{ matrix.python-version }}
|
python-version: ${{ matrix.python-version }}
|
||||||
|
- run: pip install -e ".[dev]"
|
||||||
|
- run: pytest tests/unit tests/services -m "not slow"
|
||||||
|
|
||||||
|
test-gui:
|
||||||
|
needs: [lint, type]
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: "3.11"
|
||||||
- name: Install Linux Qt deps
|
- name: Install Linux Qt deps
|
||||||
if: runner.os == 'Linux'
|
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install -y libegl1 libxkbcommon-x11-0 libxcb-icccm4 \
|
sudo apt-get install -y libegl1 libxkbcommon-x11-0 libxcb-icccm4 \
|
||||||
|
|
@ -40,9 +63,19 @@ jobs:
|
||||||
libxcb-shape0 libxcb-sync1 libxcb-xfixes0 libxcb-xinerama0 \
|
libxcb-shape0 libxcb-sync1 libxcb-xfixes0 libxcb-xinerama0 \
|
||||||
libxcb-cursor0 libdbus-1-3 libgl1 libxkbcommon0 xvfb
|
libxcb-cursor0 libdbus-1-3 libgl1 libxkbcommon0 xvfb
|
||||||
- run: pip install -e ".[dev]"
|
- run: pip install -e ".[dev]"
|
||||||
- name: Run tests (Linux, headless)
|
- run: xvfb-run -a pytest tests/gui -m "not slow"
|
||||||
if: runner.os == 'Linux'
|
|
||||||
run: xvfb-run -a pytest --cov --cov-report=xml -m "not slow"
|
test-integration:
|
||||||
- name: Run tests (Win/Mac)
|
needs: [lint, type]
|
||||||
if: runner.os != 'Linux'
|
strategy:
|
||||||
run: pytest --cov --cov-report=xml -m "not slow"
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: "3.11"
|
||||||
|
- run: pip install -e ".[dev]"
|
||||||
|
- run: pytest tests/integration -m "not slow"
|
||||||
Loading…
Reference in a new issue