File tree Expand file tree Collapse file tree 4 files changed +25
-1
lines changed Expand file tree Collapse file tree 4 files changed +25
-1
lines changed Original file line number Diff line number Diff line change 8585 run : pip install --no-deps -e .
8686 - name : pytest-spec-main
8787 run : pytest --disable-pytest-warnings
88+ - if : matrix.python-version == '3.12' && github.event_name == 'pull_request'
89+ 90+ with :
91+ coverageFile : coverage.xml
92+ token : ${{ secrets.GITHUB_TOKEN }}
93+ - if : matrix.python-version == '3.12' && github.event_name != 'pull_request'
94+ run : |
95+ pip install genbadge[coverage]
96+ genbadge coverage --input-file coverage.xml --output-file ./dist/coverage-badge.svg
97+ coverage html -d dist/coverage
98+ - uses : actions/upload-artifact@v4
99+ with :
100+ name : coverage
101+ retention-days : 1
102+ path : dist
103+
88104
89105 test-tf :
90106 runs-on : ubuntu-latest
@@ -140,6 +156,10 @@ jobs:
140156 shell : bash -l {0}
141157 steps :
142158 - uses : actions/checkout@v4
159+ - uses : actions/download-artifact@v4
160+ with :
161+ name : coverage
162+ path : dist
143163 - uses : actions/setup-python@v5
144164 with :
145165 python-version : ' 3.12'
Original file line number Diff line number Diff line change 1+ __pycache__ /
2+ .coverage
13.env
24.idea /
35.tox /
68** /tmp
79build /
810cache
11+ coverage.xml
912dist /
1013docs /
1114typings /pooch /
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ typeCheckingMode = "strict"
3030useLibraryCodeForTypes = true
3131
3232[tool .pytest .ini_options ]
33- addopts = " -n auto --capture=no --doctest-modules --failed-first"
33+ addopts = " --cov=bioimageio --cov-report=xml -n auto --capture=no --doctest-modules --failed-first"
3434
3535[tool .ruff ]
3636line-length = 88
Original file line number Diff line number Diff line change 6161 "pdoc" ,
6262 "psutil" , # parallel pytest with 'pytest -n auto'
6363 "pyright" ,
64+ "pytest-cov" ,
6465 "pytest-xdist" , # parallel pytest
6566 "pytest" ,
6667 "torch>=1.6" ,
You can’t perform that action at this time.
0 commit comments