Skip to content

Commit 62e0a8c

Browse files
realmarcinclaude
andcommitted
Add validate-strict CI workflow
Locks in the 0-error closed-schema baseline established across PRs #84-#88 so it can't silently regress on future merges. Mirrors the qc.yaml workflow shipped to TraitMech in PR #77 and adapted for the CommunityMech runner conventions. Runs `just validate-strict` + `just audit-writers` + `pytest tests/` on PRs touching kb/communities/, schema, source, scripts, justfile, or this workflow. Uploads the categorized TSV reports as workflow artifacts so reviewers can inspect failures without re-running locally. Deliberately scoped narrower than `just qc` — the existing network-quality.yml handles the network-integrity audit; this new workflow specifically gates closed-schema validation + writer audit + unit tests, which are fast and run on every PR. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 393b373 commit 62e0a8c

1 file changed

Lines changed: 59 additions & 0 deletions

File tree

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: validate-strict
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- "kb/communities/**"
7+
- "src/communitymech/schema/**"
8+
- "src/communitymech/**.py"
9+
- "scripts/**.py"
10+
- "justfile"
11+
- "pyproject.toml"
12+
- ".github/workflows/validate-strict.yaml"
13+
push:
14+
branches: [main]
15+
workflow_dispatch:
16+
17+
permissions:
18+
contents: read
19+
20+
jobs:
21+
validate-strict:
22+
runs-on: ubuntu-latest
23+
steps:
24+
- uses: actions/checkout@v4
25+
26+
- uses: extractions/setup-just@v3
27+
28+
- name: Set up Python
29+
uses: actions/setup-python@v5
30+
with:
31+
python-version: "3.10"
32+
33+
- name: Install uv
34+
uses: astral-sh/setup-uv@v5
35+
with:
36+
version: "latest"
37+
enable-cache: true
38+
39+
- name: Install dependencies
40+
run: uv sync --all-extras
41+
42+
- name: Run validate-strict (closed-schema LinkML validation)
43+
run: just validate-strict
44+
45+
- name: Run audit-writers
46+
run: just audit-writers
47+
48+
- name: Run tests
49+
run: uv run pytest tests/ -q --no-cov
50+
51+
- name: Upload reports
52+
if: always()
53+
uses: actions/upload-artifact@v4
54+
with:
55+
name: validate-strict-reports-${{ github.run_id }}
56+
path: |
57+
reports/instance_validation_failures.tsv
58+
reports/pipeline_writers_audit.tsv
59+
if-no-files-found: warn

0 commit comments

Comments
 (0)