1+ name : Build Universal Wheel
2+
3+ on :
4+ push :
5+ branches : [ master,update ]
6+ pull_request :
7+ branches : [ master ]
8+ workflow_dispatch :
9+
10+ jobs :
11+ build :
12+ runs-on : ${{ matrix.os }}
13+ strategy :
14+ matrix :
15+ include :
16+ - os : ubuntu-22.04
17+ TARGET : ubuntu
18+ CMD_BUILD : python -m build --wheel
19+
20+ steps :
21+ - uses : actions/checkout@v4
22+ - name : Set up Python 3.9
23+ uses : actions/setup-python@v5
24+ with :
25+ python-version : " 3.9"
26+
27+ - name : Install dependencies
28+ run : |
29+ pip install --upgrade pip
30+ pip install build
31+
32+ - name : Built wheel for ${{matrix.TARGET}}
33+ run : ${{matrix.CMD_BUILD}}
34+
35+ - name : Upload Python wheel
36+ uses : actions/upload-artifact@v4
37+ with :
38+ name : Python wheel
39+ path : ${{github.workspace}}/dist/raidionicsval-*.whl
40+ if-no-files-found : error
41+
42+ setup-test-data :
43+ runs-on : ubuntu-latest
44+ steps :
45+ - uses : actions/checkout@v4
46+
47+ - name : Set up Python
48+ uses : actions/setup-python@v5
49+ with :
50+ python-version : 3.9
51+
52+ - name : Download test resources
53+ working-directory : tests
54+ run : |
55+ pip install requests
56+ python -c "from download_resources import download_resources; download_resources('../test_data')"
57+
58+ - name : Upload test resources
59+ uses : actions/upload-artifact@v4
60+ with :
61+ name : test-resources
62+ path : ./test_data
63+ test :
64+ needs : [build, setup-test-data]
65+ runs-on : ${{ matrix.os }}
66+ strategy :
67+ matrix :
68+ include :
69+ - os : ubuntu-22.04
70+ python-version : " 3.8"
71+ - os : ubuntu-22.04
72+ python-version : " 3.9"
73+ - os : ubuntu-22.04
74+ python-version : " 3.10"
75+ - os : ubuntu-22.04
76+ python-version : " 3.11"
77+ - os : ubuntu-22.04
78+ python-version : " 3.12"
79+ - os : ubuntu-24.04
80+ python-version : " 3.8"
81+ - os : ubuntu-24.04
82+ python-version : " 3.9"
83+ - os : ubuntu-24.04
84+ python-version : " 3.10"
85+ - os : ubuntu-24.04
86+ python-version : " 3.11"
87+ - os : ubuntu-24.04
88+ python-version : " 3.12"
89+ - os : windows-2019
90+ python-version : " 3.8"
91+ - os : windows-2019
92+ python-version : " 3.9"
93+ - os : windows-2019
94+ python-version : " 3.10"
95+ - os : windows-2019
96+ python-version : " 3.11"
97+ - os : windows-2019
98+ python-version : " 3.12"
99+ - os : windows-2022
100+ python-version : " 3.8"
101+ - os : windows-2022
102+ python-version : " 3.9"
103+ - os : windows-2022
104+ python-version : " 3.10"
105+ - os : windows-2022
106+ python-version : " 3.11"
107+ - os : windows-2022
108+ python-version : " 3.12"
109+ - os : macos-13
110+ python-version : " 3.8"
111+ - os : macos-13
112+ python-version : " 3.9"
113+ - os : macos-13
114+ python-version : " 3.10"
115+ - os : macos-13
116+ python-version : " 3.11"
117+ - os : macos-13
118+ python-version : " 3.12"
119+ - os : macos-14
120+ python-version : " 3.10"
121+ - os : macos-14
122+ python-version : " 3.11"
123+ - os : macos-15
124+ python-version : " 3.10"
125+ - os : macos-15
126+ python-version : " 3.11"
127+
128+ steps :
129+ - name : Set up Python ${{ matrix.python-version }}
130+ uses : actions/setup-python@v5
131+ with :
132+ python-version : ${{ matrix.python-version }}
133+
134+ - name : Download artifact
135+ uses : actions/download-artifact@v4
136+ with :
137+ name : " Python wheel"
138+
139+ - name : Install wheel
140+ run : |
141+ python -m pip install --upgrade pip
142+ pip install --find-links=${{github.workspace}} --no-cache-dir --force-reinstall raidionicsval-*
143+ shell : bash
144+
145+ - name : Test CLI
146+ run : raidionicsseg --help
147+
148+ - name : Clone repo
149+ uses : actions/checkout@v4
150+
151+ - name : Download test resources
152+ uses : actions/download-artifact@v4
153+ with :
154+ name : test-resources
155+ path : ./tests/unit_tests_results_dir
156+
157+ - name : Integration tests
158+ run : |
159+ pip install pytest pytest-cov pytest-timeout requests
160+ pytest -vvv --cov=raidionicsval ${{github.workspace}}/tests/generic_tests --cov-report=xml --timeout=1000 --log-cli-level=DEBUG
161+
162+ - name : Upload coverage to Codecov
163+ if : ${{ matrix.os == 'ubuntu-22.04' && matrix.python-version == '3.9' }}
164+ uses : codecov/codecov-action@v4
165+ with :
166+ token : ${{ secrets.CODECOV_TOKEN }}
167+ slug : dbouget/validation_metrics_computation
168+ verbose : true
0 commit comments