From 1f39cff5b0f7eb83a32eecd609df7088a44e09d4 Mon Sep 17 00:00:00 2001 From: smillmorel Date: Wed, 16 Sep 2026 13:08:49 -0400 Subject: [PATCH] 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. --- .github/workflows/ci.yml | 53 ++++++++++++++++++++++++++++++++-------- 1 file changed, 43 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ebc3520..f0a7165 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,12 +14,25 @@ jobs: - uses: actions/setup-python@v5 with: 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 format --check src tests - test: - needs: lint + type: + 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: fail-fast: false matrix: @@ -31,8 +44,18 @@ jobs: - uses: actions/setup-python@v5 with: 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 - if: runner.os == 'Linux' run: | sudo apt-get update 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-cursor0 libdbus-1-3 libgl1 libxkbcommon0 xvfb - run: pip install -e ".[dev]" - - name: Run tests (Linux, headless) - if: runner.os == 'Linux' - run: xvfb-run -a pytest --cov --cov-report=xml -m "not slow" - - name: Run tests (Win/Mac) - if: runner.os != 'Linux' - run: pytest --cov --cov-report=xml -m "not slow" + - run: xvfb-run -a pytest tests/gui -m "not slow" + + test-integration: + needs: [lint, type] + strategy: + 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" \ No newline at end of file