1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
|
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@v6
with:
fetch-depth: 0
- uses: actions/setup-python@v6
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@v6
with:
name: coverage
path: |
coverage.xml
build/coverage/html/
|