-
Notifications
You must be signed in to change notification settings - Fork 19
89 lines (85 loc) · 4.51 KB
/
unit_test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
name: Unit test
on:
push:
branches: [master, development]
pull_request:
branches: [master]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
python-version: [3.7]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8
pip install -r requirements.txt
- name: Additional dependency for MaxOSX for XGBoost
run: |
brew install libomp
if: matrix.os == 'macos-latest'
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics --exclude=WORC_config.py
# exit-zero treats all errors as warnings.
flake8 . --count --exit-zero --statistics --max-line-length=1000 --exclude=WORC_config.py,*elastixtools*
- name: Install WORC package itself
run: python setup.py -q install
- name: Clone the WORC Tutorial and run as test
run: |
git clone --single-branch --branch develop https://github.com/MStarmans91/WORCTutorial
python WORCTutorial/WORCTutorialSimple.py
env:
WORCDEBUG: true
- name: Debugging on Linux
run: |
fastr trace /tmp/WORC_Example_STWStrategyHN/__sink_data__.json --sinks features_train_CT_0_predict --samples HN1331
fastr trace /tmp/WORC_Example_STWStrategyHN/__sink_data__.json --sinks classification --samples all
fastr trace /tmp/WORC_Example_STWStrategyHN/__sink_data__.json --sinks performance --samples all
fastr trace /tmp/GS/DEBUG_0/tmp/__sink_data__.json --sinks output --samples id_0__0000__0000
if: matrix.os == 'ubuntu-latest'
- name: Debugging on Windows
run: |
fastr trace "C:\Users\RUNNER~1\AppData\Local\Temp\WORC_Example_STWStrategyHN\__sink_data__.json" --sinks features_train_CT_0_predict --samples HN1331
fastr trace "C:\Users\RUNNER~1\AppData\Local\Temp\WORC_Example_STWStrategyHN\__sink_data__.json" --sinks classification --samples all
fastr trace "C:\Users\RUNNER~1\AppData\Local\Temp\WORC_Example_STWStrategyHN\__sink_data__.json" --sinks performance --samples all
fastr trace "C:\Users\RUNNER~1\AppData\Local\Temp\GS\DEBUG_0\tmp\__sink_data__.json" --sinks output --samples id_0__0000__0000
if: matrix.os == 'windows-latest'
- name: Debugging on MaxOSX
run: |
fastr trace WORCTutorial/WORC_Example_STWStrategyHN/__sink_data__.json --sinks features_train_CT_0_predict --samples HN1331
fastr trace WORCTutorial/WORC_Example_STWStrategyHN/__sink_data__.json --sinks classification --samples all
fastr trace WORCTutorial/WORC_Example_STWStrategyHN/__sink_data__.json --sinks performance --samples all
fastr trace WORCTutorial/GS/DEBUG_0/tmp/__sink_data__.json --sinks output --samples id_0__0000__0000
if: matrix.os == 'macos-latest'
- name: Run additional test for regression on Linux
run: |
rm -r /tmp/GS/DEBUG_0
python WORC/tests/WORCTutorialSimple_unittest_regression.py
fastr trace /tmp/WORC_Example_STWStrategyHN_Regression/__sink_data__.json --sinks classification --samples all
fastr trace /tmp/WORC_Example_STWStrategyHN_Regression/__sink_data__.json --sinks performance --samples all
fastr trace /tmp/GS/DEBUG_0/tmp/__sink_data__.json --sinks output --samples id_0__0000__0000
env:
WORCDEBUG: true
if: matrix.os == 'ubuntu-latest'
- name: Run additional tests for multiclass on Linux
run: |
rm -r /tmp/GS/DEBUG_0
python WORC/tests/WORCTutorialSimple_unittest_multiclass.py
fastr trace /tmp/WORC_Example_STWStrategyHN_Multiclass/__sink_data__.json --sinks classification --samples all
fastr trace /tmp/WORC_Example_STWStrategyHN_Multiclass/__sink_data__.json --sinks performance --samples all
fastr trace /tmp/GS/DEBUG_0/tmp/__sink_data__.json --sinks output --samples id_0__0000__0000
env:
WORCDEBUG: true
if: matrix.os == 'ubuntu-latest'