Skip to content

Commit fde2cee

Browse files
committed
Add CI workflow to validate release checklist YAML
1 parent a1a985d commit fde2cee

1 file changed

Lines changed: 52 additions & 0 deletions

File tree

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Validate Release Configuration
2+
3+
on:
4+
push:
5+
paths:
6+
- 'release/release-checklist.yaml'
7+
pull_request:
8+
paths:
9+
- 'release/release-checklist.yaml'
10+
11+
jobs:
12+
validate:
13+
runs-on: ubuntu-latest
14+
name: Validate release checklist YAML
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: Set up Python
20+
uses: actions/setup-python@v5
21+
with:
22+
python-version: '3.11'
23+
24+
- name: Install dependencies
25+
run: pip install pyyaml
26+
27+
- name: Validate release checklist structure
28+
run: |
29+
python3 - <<'EOF'
30+
import yaml, sys
31+
32+
with open("release/release-checklist.yaml") as f:
33+
config = yaml.safe_load(f)
34+
35+
required_top = ["metadata", "model_validation", "governance", "infrastructure"]
36+
missing = [k for k in required_top if k not in config]
37+
if missing:
38+
print(f"ERROR: Missing required sections: {missing}")
39+
sys.exit(1)
40+
41+
meta = config.get("metadata", {})
42+
required_meta = ["project", "version", "environment", "regulated_industry", "risk_classification"]
43+
missing_meta = [k for k in required_meta if not meta.get(k) or meta.get(k) in [None, "YOUR_PROJECT_NAME"]]
44+
if missing_meta:
45+
print(f"WARNING: Unconfigured metadata fields: {missing_meta}")
46+
print("Please customize release-checklist.yaml with your project details.")
47+
48+
print("✓ Release checklist YAML structure is valid")
49+
print(f" Project: {meta.get('project', 'not set')}")
50+
print(f" Environment: {meta.get('environment', 'not set')}")
51+
print(f" Risk Classification: {meta.get('risk_classification', 'not set')}")
52+
EOF

0 commit comments

Comments
 (0)