[pre-commit.ci] pre-commit autoupdate #564
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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.10", "3.11", "3.12", "3.13", "3.14"] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| allow-prereleases: true | |
| - name: Cache DICOM standard | |
| id: cache-dicom | |
| uses: actions/cache@v4 | |
| with: | |
| path: dicom_validator/tests/fixtures/standard | |
| key: "2015b_2025d" | |
| enableCrossOsArchive: true | |
| - name: Download DICOM standard | |
| if: steps.cache-dicom.outputs.cache-hit != 'true' | |
| run: | | |
| pip install -e . | |
| python .github/workflows/get_revision.py 2015b "`pwd`/dicom_validator/tests/fixtures/standard" | |
| python .github/workflows/get_revision.py 2025d "`pwd`/dicom_validator/tests/fixtures/standard" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements-dev.txt | |
| pip install pytest-xdist | |
| pip install -e . | |
| - name: Run commandline tool tests | |
| run: | | |
| if [[ '${{ matrix.os }}' == 'ubuntu-latest' && '${{ matrix.python-version }}' == '3.13' ]] | |
| then | |
| python -m pytest -n 0 --cov-append --cov=dicom_validator --cov-config=.coveragerc dicom_validator/tests/test_cmdline_tools.py | |
| else | |
| python -m pytest -n 0 dicom_validator/tests/test_cmdline_tools.py | |
| fi | |
| - name: Run spec-reader and validator tests | |
| run: | | |
| if [[ '${{ matrix.os }}' == 'ubuntu-latest' && '${{ matrix.python-version }}' == '3.13' ]] | |
| then | |
| python -m pytest -n auto --cov-append --cov=dicom_validator --cov-config=.coveragerc dicom_validator/tests/spec_reader dicom_validator/tests/validator | |
| else | |
| python -m pytest -n auto dicom_validator/tests/spec_reader dicom_validator/tests/validator | |
| fi | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v5 | |
| if: ${{ success() && matrix.python-version == '3.13' && matrix.os == 'ubuntu-latest' }} | |
| with: | |
| name: codecov-dicom-validator |