ci(test): coverage gating with pytest-cov (v0.6.2) #4
Workflow file for this run
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: mcp-allowlist | |
| on: | |
| pull_request: | |
| paths: | |
| - "config/mcp/**" | |
| - "scripts/ci/validate_mcp_allowlist.py" | |
| - "lab/tests/**" | |
| - "docs/mcp/**" | |
| jobs: | |
| validate: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: { fetch-depth: 0 } | |
| - uses: actions/setup-python@v5 | |
| with: { python-version: "3.11" } | |
| - name: Install test deps | |
| run: | | |
| pip install -r requirements.txt || true | |
| if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi | |
| python - <<'PY' | |
| import sys, subprocess | |
| # ensure yaml for validator | |
| subprocess.check_call([sys.executable, "-m", "pip", "install", "pyyaml"]) | |
| PY | |
| - name: Validate allowlist schema | |
| run: scripts/ci/validate_mcp_allowlist.py | |
| - name: Run allowlist tests | |
| run: pytest -q lab/tests/test_mcp_allowlist.py |