Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
1 change: 1 addition & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[run]
branch = True
parallel = True
concurrency = multiprocessing
data_file = .coverage
source = src
Expand Down
19 changes: 12 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ jobs:
test:
runs-on: scilus-large
if: github.repository == 'scilus/scilpy'
env:
COVERAGE_PROCESS_START: .coveragerc

steps:
- name: Checkout repository at merge
Expand Down Expand Up @@ -69,20 +71,23 @@ jobs:
# https://discourse.vtk.org/t/status-update-runtime-opengl-render-window-selection-in-vtk/14583
VTK_VERSION=$(cat pyproject.toml | grep 'vtk==' | sed 's/vtk==//g' | sed 's/\"//g' )
pip install --extra-index-url https://wheels.vtk.org vtk-osmesa==$VTK_VERSION
uv pip install pytest-xdist pytest-cov
uv pip install pytest-xdist coverage
scil_data_download
scil_search_keywords test --regenerate_help_files --processes 8

- name: Run unit tests
run: |
uv run --active pytest src/scilpy --cov-report term-missing:skip-covered --dist=loadgroup --ignore=src/scilpy/cli
mv .test_reports unit_test_reports
uv run --active coverage run -m pytest src/scilpy --dist=loadgroup --ignore=src/scilpy/cli
uv run --active coverage combine
uv run --active coverage xml -o unit_test_reports/coverage.xml
mv .coverage coverage.unit

- name: Run smoke tests
run: |
uv run --active pytest src/scilpy/cli --cov-report term-missing:skip-covered --dist=loadgroup
uv run --active coverage run -m pytest src/scilpy/cli --dist=loadgroup
uv run --active coverage combine
uv run --active coverage xml -o smoke_test_reports/coverage.xml
mv .coverage .coverage.smoke
mv .test_reports smoke_test_reports

- name: Save test results and coverage
uses: actions/upload-artifact@v4
Expand All @@ -109,7 +114,7 @@ jobs:
with:
name: test-coverage-${{ github.run_id }}

- name: Upload coverage reports to Codecov
- name: Upload unit test coverage reports to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
Expand All @@ -120,7 +125,7 @@ jobs:
verbose: true
fail_ci_if_error: true

- name: Upload coverage reports to Codecov
- name: Upload smoke test coverage reports to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
Expand Down