fix(deploy): PreSync-gate eruit, het Argo-project staat geen Job toe #95
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| pull_request: | |
| branches: [main] | |
| push: | |
| branches: [main] | |
| # Per .github/CONTRIBUTING.md: hooks faken niet, CI is de waarheid. | |
| # Vijf parallelle jobs zodat een snelle fix-en-retry-cycle direct zichtbaar is | |
| # welke poort gefaald is. | |
| permissions: | |
| contents: read | |
| jobs: | |
| lint: | |
| name: ruff check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| enable-cache: true | |
| - run: uv sync --dev --frozen | |
| - run: uv run ruff check . | |
| format: | |
| name: ruff format --check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| enable-cache: true | |
| - run: uv sync --dev --frozen | |
| - run: uv run ruff format --check . | |
| typecheck: | |
| name: mypy --strict | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| enable-cache: true | |
| - run: uv sync --dev --frozen | |
| - run: uv run mypy --strict src | |
| security: | |
| name: bandit | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| enable-cache: true | |
| - run: uv sync --dev --frozen | |
| # Deze gate stond sinds 2026-06-17 permanent rood, om twee redenen die | |
| # elkaar maskeerden: | |
| # | |
| # 1. CI gaf `-c pyproject.toml` NIET mee, terwijl de pre-commit-hook dat | |
| # wel doet. De gedocumenteerde `[tool.bandit]`-skips (B101 voor | |
| # pytest-asserts) golden dus lokaal en niet in CI — precies de stille | |
| # divergentie tussen CI en lokaal die CLAUDE.md verbiedt. | |
| # 2. `bandit` geeft exitcode 1 bij ÉLKE bevinding, ook low-severity. Met | |
| # vier pre-existing lows (B110/B112/B404/B607) faalde de stap altijd, | |
| # ook mét config. Ook `pre-commit run --all-files` was daarmee rood. | |
| # | |
| # Een gate die altijd rood staat, is geen gate: een écht nieuw probleem valt | |
| # niet op tussen de ruis. Nu twee stappen, en dezelfde argumenten als de | |
| # bandit-hook in .pre-commit-config.yaml — houd die twee gelijk. | |
| # | |
| # De vier bestaande lows elk beoordelen en waar terecht van een | |
| # `# nosec BXXX` met reden voorzien is beter auditspoor, maar dat is eigen | |
| # werk — geen reden om de gate ondertussen rood te laten staan. | |
| - name: Rapporteer alle bevindingen (niet-blokkerend) | |
| run: uv run bandit -c pyproject.toml -r src || true | |
| - name: Faal op medium en hoger | |
| run: uv run bandit -c pyproject.toml -r src --severity-level medium | |
| test: | |
| name: pytest --cov | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| enable-cache: true | |
| - run: uv sync --dev --frozen | |
| # Coverage-gate 70% per milestone B baseline-meting (2026-05-13): | |
| # baseline op huidige Ops_to_Biz/audit = 0% (geen tests in oude codebase); | |
| # gate = max(baseline + 5%, 70%) = 70%; plafond 85% per | |
| # project_audit_volgende_stappen.md. Huidige iso-audit M-A scaffolding | |
| # rapporteert 80% coverage (211 stmts, 38 missed) — ruim boven gate. | |
| - run: uv run pytest --cov --cov-fail-under=70 |