Skip to content

[pre-commit.ci] pre-commit autoupdate #95

[pre-commit.ci] pre-commit autoupdate

[pre-commit.ci] pre-commit autoupdate #95

Workflow file for this run

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/tests/fixtures
key: ${{ matrix.dicom-version }}
enableCrossOsArchive: true
- 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