Skip to content
Draft
69 changes: 69 additions & 0 deletions .github/workflows/control-plane-sli-receipt-quality-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: Control Plane SLI Receipt Quality CI

on:
pull_request:
branches: [main]
paths:
- ".github/workflows/control-plane-sli-receipt-quality-ci.yml"
- "scripts/ci/control_plane_sli_receipt.py"
- "tests/test_control_plane_sli_receipt.py"
- "docs/automation/OPERABILITY.md"
- "docs/automation/TRACEABILITY.md"
- "docs/doctoring/control-plane-sli-receipts.md"
- "CHANGELOG.md"

permissions:
contents: read

concurrency:
group: control-plane-sli-receipt-quality-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
exact-head-quality:
runs-on: ubuntu-24.04
timeout-minutes: 20
steps:
- name: Checkout exact source revision
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }}
persist-credentials: false

- name: Set up Python 3.14
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: "3.14"

- name: Install hash-locked repository quality tooling
shell: bash --noprofile --norc -e -o pipefail {0}
run: >-
python -m pip install --disable-pip-version-check --require-hashes
-r requirements-opencode-review-ci-hashes.txt

- name: Run focused SLI receipt tests with complete branch coverage
shell: bash --noprofile --norc -e -o pipefail {0}
run: |
test "$(git rev-parse HEAD)" = "${{ github.event.pull_request.head.sha || github.sha }}"
python -m coverage erase
python -m coverage run --branch --source=scripts.ci.control_plane_sli_receipt \
-m pytest tests/test_control_plane_sli_receipt.py -q
python -m coverage report --show-missing --fail-under=100

- name: Enforce public docstrings and compilation
shell: bash --noprofile --norc -e -o pipefail {0}
run: |
python -m interrogate --fail-under 100 --ignore-init-method \
scripts/ci/control_plane_sli_receipt.py
python -m compileall -q \
scripts/ci/control_plane_sli_receipt.py \
tests/test_control_plane_sli_receipt.py

- name: Run complete central test suite
shell: bash --noprofile --norc -e -o pipefail {0}
run: python -m pytest tests -q

- name: Verify clean patch
shell: bash --noprofile --norc -e -o pipefail {0}
run: git diff --check

Loading
Loading