File tree Expand file tree Collapse file tree 1 file changed +24
-6
lines changed
Expand file tree Collapse file tree 1 file changed +24
-6
lines changed Original file line number Diff line number Diff line change 1- name : Validate Dataset
1+ # .github/workflows/validate-data.yml
2+ name : Validate dataset
23
34on :
5+ push :
6+ paths :
7+ - " data/**/*.json"
8+ - " .github/schema/**/*.json"
9+ - " .github/workflows/validate-data.yml"
410 pull_request :
511 paths :
6- - ' data/terms.json'
12+ - " data/**/*.json"
13+ - " .github/schema/**/*.json"
14+ - " .github/workflows/validate-data.yml"
715
816jobs :
917 validate :
1018 runs-on : ubuntu-latest
1119 steps :
12- - name : Checkout repo
20+ - name : Checkout
1321 uses : actions/checkout@v4
1422
15- - name : Install ajv-cli
16- run : npm install -g ajv-cli
23+ - name : Setup Node
24+ uses : actions/setup-node@v4
25+ with :
26+ node-version : " 20"
1727
28+ # Use npx to pull AJV + formats
1829 - name : Validate terms.json against schema
19- run : ajv validate -s .github/schema/terms.schema.json -d data/terms.json --errors=text
30+ run : |
31+ npx -y -p ajv-cli@5 -p ajv@8 -p ajv-formats@3 \
32+ ajv validate \
33+ -s .github/schema/terms.schema.json \
34+ -d data/terms.json \
35+ -c ajv-formats \
36+ --spec=draft7 \
37+ --errors=text
You can’t perform that action at this time.
0 commit comments