File tree Expand file tree Collapse file tree 2 files changed +24
-18
lines changed Expand file tree Collapse file tree 2 files changed +24
-18
lines changed Original file line number Diff line number Diff line change 1
- name : Validation
1
+ name : Run Tests
2
2
3
3
on :
4
4
push :
5
5
branches : [main]
6
6
pull_request :
7
7
branches : [main]
8
8
9
-
10
9
jobs :
11
- validate :
12
- runs-on : ubuntu-latest
13
- steps :
14
- - uses : actions/checkout@v4
15
- - uses : actions/setup-python@v5
16
- - name : Install dependencies
17
- run : |
18
- python -m pip install --upgrade pip
19
- pip install jsonschema requests
20
- - name : Validate
21
- run : |
22
- python validate_probes.py
10
+ test :
11
+ runs-on : ubuntu-latest
12
+
13
+ steps :
14
+ - uses : actions/checkout@v4
15
+
16
+ - name : Set up Python
17
+ uses : actions/setup-python@v5
18
+
19
+ - name : Install dependencies
20
+ run : |
21
+ python -m pip install --upgrade pip
22
+ pip install jsonschema requests pytest
23
+
24
+ - name : Run tests
25
+ run : |
26
+ python -m pytest tests.py -v
Original file line number Diff line number Diff line change 1
1
import glob
2
- import jsonschema
3
2
import json
3
+
4
+ import jsonschema
5
+ import pytest
4
6
import requests
5
7
6
8
schema_url = "https://raw.githubusercontent.com/SpikeInterface/probeinterface/main/resources/probe.json.schema"
10
12
11
13
files = glob .glob ("*/*/*.json" )
12
14
13
- print ( "Validating the following files:" )
14
- for file in files :
15
- print (file )
15
+
16
+ @ pytest . mark . parametrize ( " file" , files )
17
+ def test_valid_probe_dict (file ):
16
18
with open (file ) as f :
17
19
data = json .load (f )
18
20
jsonschema .validate (data , response .json ())
You can’t perform that action at this time.
0 commit comments