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.
81 lines
No EOL
2.3 KiB
YAML
81 lines
No EOL
2.3 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main, develop]
|
|
pull_request:
|
|
branches: [main, develop]
|
|
|
|
jobs:
|
|
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 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
|
|
|
|
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:
|
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
|
python-version: ["3.10", "3.11", "3.12"]
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- 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
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y libegl1 libxkbcommon-x11-0 libxcb-icccm4 \
|
|
libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 \
|
|
libxcb-shape0 libxcb-sync1 libxcb-xfixes0 libxcb-xinerama0 \
|
|
libxcb-cursor0 libdbus-1-3 libgl1 libxkbcommon0 xvfb
|
|
- run: pip install -e ".[dev]"
|
|
- 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" |