|
| 1 | +# ────────────────────────────────────────────────────────────────────── |
| 2 | +# SCPN Phase Orchestrator — Continuous integration |
| 3 | +# © 1998–2026 Miroslav Šotek. All rights reserved. |
| 4 | +# Contact: www.anulum.li | protoscience@anulum.li |
| 5 | +# License: GNU AGPL v3 | Commercial licensing available |
| 6 | +# ────────────────────────────────────────────────────────────────────── |
| 7 | + |
| 8 | +name: CI |
| 9 | + |
| 10 | +on: |
| 11 | + push: |
| 12 | + branches: [main, develop] |
| 13 | + pull_request: |
| 14 | + branches: [main] |
| 15 | + |
| 16 | +jobs: |
| 17 | + lint: |
| 18 | + runs-on: ubuntu-latest |
| 19 | + steps: |
| 20 | + - uses: actions/checkout@v4 |
| 21 | + - uses: actions/setup-python@v5 |
| 22 | + with: |
| 23 | + python-version: "3.12" |
| 24 | + - run: pip install -e ".[dev]" |
| 25 | + - run: ruff check src/ tests/ |
| 26 | + - run: ruff format --check src/ tests/ |
| 27 | + |
| 28 | + typecheck: |
| 29 | + runs-on: ubuntu-latest |
| 30 | + steps: |
| 31 | + - uses: actions/checkout@v4 |
| 32 | + - uses: actions/setup-python@v5 |
| 33 | + with: |
| 34 | + python-version: "3.12" |
| 35 | + - run: pip install -e ".[dev]" |
| 36 | + - run: mypy src/scpn_phase_orchestrator/ --ignore-missing-imports |
| 37 | + |
| 38 | + test: |
| 39 | + runs-on: ubuntu-latest |
| 40 | + strategy: |
| 41 | + matrix: |
| 42 | + python-version: ["3.10", "3.11", "3.12"] |
| 43 | + steps: |
| 44 | + - uses: actions/checkout@v4 |
| 45 | + - uses: actions/setup-python@v5 |
| 46 | + with: |
| 47 | + python-version: ${{ matrix.python-version }} |
| 48 | + - run: pip install -e ".[dev]" |
| 49 | + - run: pytest tests/ -v --tb=short --cov=scpn_phase_orchestrator --cov-report=term-missing |
| 50 | + |
| 51 | + security: |
| 52 | + runs-on: ubuntu-latest |
| 53 | + steps: |
| 54 | + - uses: actions/checkout@v4 |
| 55 | + - uses: actions/setup-python@v5 |
| 56 | + with: |
| 57 | + python-version: "3.12" |
| 58 | + - run: pip install bandit |
| 59 | + - run: bandit -r src/ -c pyproject.toml |
| 60 | + |
| 61 | + rust-check: |
| 62 | + runs-on: ubuntu-latest |
| 63 | + defaults: |
| 64 | + run: |
| 65 | + working-directory: spo-kernel |
| 66 | + steps: |
| 67 | + - uses: actions/checkout@v4 |
| 68 | + - uses: dtolnay/rust-toolchain@stable |
| 69 | + - run: cargo fmt --check |
| 70 | + - run: cargo clippy -- -D warnings |
| 71 | + - run: cargo test |
| 72 | + |
| 73 | + ci-gate: |
| 74 | + needs: [lint, typecheck, test, security, rust-check] |
| 75 | + runs-on: ubuntu-latest |
| 76 | + steps: |
| 77 | + - run: echo "All checks passed" |
0 commit comments