Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:

- name: Run pytest
run: |
pixi run -e ${{ matrix.env }} test
pixi run -e ${{ matrix.env }} test -s -vv

- name: Upload coverage report artifact to be used by Codecov
# only upload if matrix.os is ubuntu-latest and matrix.python-version is 3.12
Expand All @@ -40,7 +40,14 @@ jobs:
with:
name: coverage-report
path: coverage-report


- name: JUnit Test Summary
id: pytest-summary
uses: test-summary/action@v2
with:
paths: .cache/test-results/**/*.xml
show: "fail,skip"
if: always()
################################################################################################
# Codecov: Run codecov to check coverage
################################################################################################
Expand Down
68 changes: 68 additions & 0 deletions config/pytest.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
[pytest]
# Minimum required pytest version for this configuration
# Ensures compatibility with the specified features
minversion = 7.0

cache_dir=.cache/pytest

# Configure console output style
# Sets the format of test result output
console_output_style = progress

# Additional command-line options to always include
# Sets default behavior for test runs
addopts =
# Show detailed test progress and results
# Improves visibility of test execution
; --verbose
# Show local variables in tracebacks
# Helps with debugging failed tests
--showlocals
# Tracks code coverage during test execution
--cov
# Output coverage report in terminal
# Provides immediate feedback on coverage
--cov-report=term-missing
# Generate XML coverage report
# Creates detailed coverage report for upload to code coverage services
--cov-report=xml:coverage-report/coverage.xml
# Generate HTML coverage report
# Creates detailed coverage report for analysis
--cov-report=html:coverage-report/htmlcov
# Point to coverage config file
# Allows customization of coverage report generation
--cov-config=config/coverage.toml
# xdist_group
# sends tests to the same worker if they are in the same group
--dist=loadgroup
# xdist numprocesses
--numprocesses=auto
--maxprocesses=12

# Junit params
# XML path
--junitxml=.cache/test-results/junit.xml

# JUnit XML report
# Junit is a widely used XML format for test reports
junit_suite_name = readii


# Patterns for test discovery
# Defines which files are considered test files
testpaths = tests

# Files to ignore during test collection
# Excludes specified files from testing
norecursedirs = *.egg .eggs dist build docs .tox .git __pycache__

# Test filename patterns
# Defines patterns for test file discovery
python_files = test_*.py *_test.py *_tests.py

# Ignore warnings
# Suppresses warnings during test execution
filterwarnings =
ignore::DeprecationWarning
# Add specific warning messages to ignore here
ignore::UserWarning:pydicom.*
Loading
Loading