-
Notifications
You must be signed in to change notification settings - Fork 11
57 lines (49 loc) · 1.61 KB
/
testsuite.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
name: Testsuite
on: [push, pull_request]
defaults:
run:
shell: bash
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
python-version: ["3.8", "3.9", "3.10", "3.11"]
dicom-version: ["2023c"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-dev.txt
pip install -e .
- name: Cache DICOM standard
id: cache-dicom
uses: actions/cache@v3
with:
path: dicom_validator/test/fixtures
key: ${{ matrix.dicom-version }}
- name: Download DICOM standard
if: steps.cache-dicom.outputs.cache-hit != 'true'
run: |
pip install -e .
python .github/workflows/get_revision.py ${{ matrix.dicom-version }} "`pwd`/dicom_validator/tests/fixtures"
- name: Run tests with coverage
run: |
if [[ '${{ matrix.os }}' == 'ubuntu-latest' && '${{ matrix.python-version }}' == '3.10' ]]
then
python -m pytest --cov=dicom_validator --cov-config=.coveragerc dicom_validator
else
python -m pytest dicom_validator
fi
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
if: ${{ success() && matrix.python-version == '3.10' && matrix.os == 'ubuntu-latest' }}
with:
name: codecov-dicom-validator