da14fb3a42
Bumps the actions-deps group with 1 update: [actions/setup-python](https://github.com/actions/setup-python). Updates `actions/setup-python` from 6 to 7 - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](https://github.com/actions/setup-python/compare/v6...v7) --- updated-dependencies: - dependency-name: actions/setup-python dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions-deps ... Signed-off-by: dependabot[bot] <support@github.com>
46 lines
1.5 KiB
YAML
46 lines
1.5 KiB
YAML
name: Run coverage tests
|
|
on: [workflow_dispatch, workflow_call]
|
|
jobs:
|
|
coverage:
|
|
runs-on: ubuntu-24.04
|
|
strategy:
|
|
fail-fast: true
|
|
env:
|
|
PYTEST_ADDOPTS: --cov mpmath --cov-append -n auto
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
with:
|
|
fetch-depth: 0
|
|
- uses: actions/setup-python@v7
|
|
with:
|
|
python-version: "3.x"
|
|
- name: Install dependencies
|
|
run: |
|
|
pip install --upgrade setuptools pip
|
|
pip install --upgrade .[develop,gmpy2,gmp,ci]
|
|
- name: Run coverage tests
|
|
run: |
|
|
pytest
|
|
pip uninstall -y ipython
|
|
pytest mpmath/tests/test_cli.py
|
|
pip uninstall -y gmpy2
|
|
pytest mpmath/tests/test_basic_ops.py mpmath/tests/test_convert.py \
|
|
mpmath/tests/test_functions.py mpmath/tests/test_gammazeta.py \
|
|
mpmath/tests/test_bitwise.py
|
|
pip uninstall -y python-gmp
|
|
pytest mpmath/tests/test_basic_ops.py mpmath/tests/test_convert.py \
|
|
mpmath/tests/test_functions.py mpmath/tests/test_gammazeta.py \
|
|
mpmath/tests/test_bitwise.py
|
|
- name: Generate coverage reports
|
|
run: |
|
|
coverage xml
|
|
coverage html
|
|
diff-cover coverage.xml --fail-under=100 \
|
|
--compare-branch=origin/master
|
|
- uses: actions/upload-artifact@v7
|
|
with:
|
|
name: coverage
|
|
path: |
|
|
coverage.xml
|
|
build/coverage/html/
|