File tree Expand file tree Collapse file tree 4 files changed +45
-0
lines changed Expand file tree Collapse file tree 4 files changed +45
-0
lines changed Original file line number Diff line number Diff line change
1
+ # SRComp Validate Action
2
+
3
+ A GitHub Action to validate a compstate.
Original file line number Diff line number Diff line change
1
+ name : SRComp Validate Action
2
+ description : A GitHub Action to validate a compstate.
3
+ runs :
4
+ using : composite
5
+ steps :
6
+ - name : Set up Python
7
+ uses : actions/checkout@v3
8
+ with :
9
+ python-version : ' 3.10'
10
+ cache : pip
11
+
12
+ - name : Install Dependencies
13
+ run : pip install -r requirements.txt
14
+
15
+ - name : Run Compstate Validation
16
+ run : ./validate.py
17
+
18
+ - name : Run Scoring tests
19
+ run :
20
+ python3 -m unittest discover --buffer scoring/
21
+
22
+ if [ -d scoring/tests/ ]
23
+ then
24
+ python3 -m unittest discover --buffer scoring/tests/
25
+ fi
Original file line number Diff line number Diff line change
1
+ sr.comp >= 1.4 < 2
Original file line number Diff line number Diff line change
1
+ #!/usr/bin/env python3
2
+
3
+ from argparse import ArgumentParser
4
+
5
+ from sr .comp .comp import SRComp
6
+ from sr .comp .validation import validate
7
+
8
+ parser = ArgumentParser (description = "SR Competition State validator" )
9
+ parser .add_argument ("compstate" , help = "Competition state git repository path" )
10
+
11
+ args = parser .parse_args ()
12
+
13
+ comp = SRComp (args .compstate )
14
+ error_count = validate (comp )
15
+
16
+ exit (error_count )
You can’t perform that action at this time.
0 commit comments