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
22
33on :
44 push :
55 branches : [main]
66 pull_request :
77 branches : [main]
88
9-
109jobs :
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 11import glob
2- import jsonschema
32import json
3+
4+ import jsonschema
5+ import pytest
46import requests
57
68schema_url = "https://raw.githubusercontent.com/SpikeInterface/probeinterface/main/resources/probe.json.schema"
1012
1113files = glob .glob ("*/*/*.json" )
1214
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 ):
1618 with open (file ) as f :
1719 data = json .load (f )
1820 jsonschema .validate (data , response .json ())
You can’t perform that action at this time.
0 commit comments