-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (35 loc) · 1.38 KB
/
Copy pathvalidate-content.yml
File metadata and controls
38 lines (35 loc) · 1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# Content validation (Phase 60 / v1.44.0, D-108; EXP-039).
#
# Runs the validator on every pull request (and on pushes to main)
# so no broken or low-quality lesson set can land. The structural
# fields are validated against the canonical JSON Schema vendored
# under schema/ (a mirror of the pinned learn-content-engine
# release; source-of-truth chain: engine (canonical) -> this
# mirror), the quality minimums are read from
# schema/quality-rules.json, and the content-repo specifics
# (language pair, directory structure, non-Latin scripts) stay in
# the validator. Everything here reads only committed files — the
# validation itself works fully offline.
name: Validate content
on:
pull_request:
push:
branches: [main]
# Coerce Node-runtime actions onto Node 24 as a safety net for any
# action still defaulting to the deprecated Node 20 runtime.
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true"
jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-python@v6
with:
python-version: "3.12"
- name: Install validator dependencies
run: pip install "pyyaml>=6,<7" "jsonschema>=4,<5" "pytest>=8,<9" regex
- name: Validate content tree
run: python scripts/validate_content.py
- name: Repo test suite (shape parity #1208, drift-gate units)
run: python -m pytest tests -q