-
Notifications
You must be signed in to change notification settings - Fork 1
73 lines (64 loc) · 1.9 KB
/
validate.yml
File metadata and controls
73 lines (64 loc) · 1.9 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: Content Validation
on:
push:
branches: [main]
paths:
- 'llm-top10/**'
- 'agentic-top10/**'
- 'dsgai-2026/**'
- 'shared/**'
- 'data/**'
- 'CROSSREF.md'
- 'README.md'
- 'scripts/validate.js'
pull_request:
branches: [main]
paths:
- 'llm-top10/**'
- 'agentic-top10/**'
- 'dsgai-2026/**'
- 'shared/**'
- 'data/**'
- 'CROSSREF.md'
- 'README.md'
- 'scripts/validate.js'
jobs:
validate:
name: Structural validation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Run content validator
run: node scripts/validate.js
- name: Validate JSON schema
run: |
node -e "
const fs = require('fs');
const schema = JSON.parse(fs.readFileSync('data/schema.json', 'utf8'));
console.log('schema.json is valid JSON');
console.log('Title:', schema.title);
console.log('Required fields:', schema.required.join(', '));
"
mapping-counts:
name: Count consistency
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check mapping file counts match README badge
run: |
LLM=$(ls llm-top10/*.md | wc -l)
AGT=$(ls agentic-top10/*.md | wc -l)
DSG=$(ls dsgai-2026/*.md | wc -l)
TOTAL=$((LLM + AGT + DSG))
echo "LLM: $LLM Agentic: $AGT DSGAI: $DSG Total: $TOTAL"
BADGE=$(grep -o 'mapping%20files-[0-9]*-brightgreen' README.md | grep -o '[0-9]*')
echo "README badge: $BADGE"
if [ "$TOTAL" != "$BADGE" ]; then
echo "::error::Count mismatch — $TOTAL files on disk but README badge says $BADGE"
exit 1
fi
echo "Counts consistent: $TOTAL"