File tree Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : JSON Schema Validation
2
+
3
+ on :
4
+ push :
5
+ branches : [ main, develop ]
6
+ pull_request :
7
+ branches : [ main, develop ]
8
+
9
+ jobs :
10
+ validate-json :
11
+ runs-on : ubuntu-latest
12
+
13
+ steps :
14
+ - name : Checkout repository
15
+ uses : actions/checkout@v4
16
+
17
+ - name : Install sourcemeta json schema cli
18
+ uses : sourcemeta/jsonschema@main
19
+
20
+ - name : Lint JSON files
21
+ run : |
22
+ echo "Linting JSON files..."
23
+ set -e # Exit on any error
24
+ echo "Linting softbinding-algorithm-list.json..."
25
+ jsonschema lint softbinding-algorithm-list.json
26
+ echo "✓ softbinding-algorithm-list.json passed linting"
27
+
28
+ echo "Linting softbinding-algorithm-entry-schema.json..."
29
+ jsonschema lint softbinding-algorithm-entry-schema.json
30
+ echo "✓ softbinding-algorithm-entry-schema.json passed linting"
31
+
32
+ - name : Validate against schema
33
+ run : |
34
+ echo "Validating softbinding-algorithm-list.json against schema..."
35
+ set -e # Exit on any error
36
+ jsonschema validate softbinding-algorithm-list.json --schema softbinding-algorithm-entry-schema.json
37
+ echo "✓ softbinding-algorithm-list.json is valid against the schema"
You can’t perform that action at this time.
0 commit comments