66 strategy :
77 fail-fast : false
88 matrix :
9- python-version : [3.8, 3.9, '3.10', 3.11, 3.12, pypy3.8, pypy3.9, pypy3.10]
9+ python-version : [3.8, 3.9, '3.10', 3.11, 3.12, 3.13, pypy3.8, pypy3.9, pypy3.10]
10+ coverage : [false]
11+ nogmpy : [false]
12+ default : [false]
13+ include :
14+ - python-version : 3.11
15+ coverage : true
16+ nogmpy : true
17+ - python-version : 3.12
18+ coverage : true
19+ default : true
1020 env :
1121 PYTEST_ADDOPTS : -n auto
1222 steps :
1323 - uses : actions/checkout@v4
1424 with :
1525 fetch-depth : 0
1626 - name : Set up Python ${{ matrix.python-version }}
17- uses : actions/setup-python@v4
27+ uses : actions/setup-python@v5
1828 with :
1929 python-version : ${{ matrix.python-version }}
2030 allow-prereleases : true
@@ -26,46 +36,43 @@ jobs:
2636 run : |
2737 pip install --upgrade setuptools pip
2838 pip install --upgrade .[develop,gmpy,docs,ci]
39+ - name : Remove gmpy (for coverage tests)
40+ if : matrix.nogmpy
41+ run : pip uninstall -y gmpy2
2942 - name : Linting with flake8, etc
30- if : matrix.python-version >= 3.9
43+ if : matrix.default
3144 run : |
3245 python -We:invalid -m compileall -f mpmath -q
3346 flake518
3447 - name : Tests
35- if : matrix.python-version != 3.10 && matrix.python-version != 3.11
36- run : |
37- pytest
38- MPMATH_STRICT=Y pytest mpmath/tests/test_basic_ops.py
39- - name : Remove gmpy on 3.10
40- if : matrix.python-version == 3.10
41- run : pip uninstall -y gmpy2
48+ if : ${{ ! matrix.coverage }}
49+ run : pytest
4250 - name : Run coverage tests
4351 env :
4452 PYTEST_ADDOPTS : --cov mpmath --cov-append -n auto
45- if : matrix.python-version == 3.10 || matrix.python-version == 3.11
53+ if : matrix.coverage
4654 run : |
4755 pytest
48- MPMATH_STRICT=Y pytest mpmath/tests/test_basic_ops.py
4956 coverage html
5057 coverage xml
5158 - name : Upload coverage data
52- if : matrix.python-version == 3.10 || matrix.python-version == 3.11
59+ if : matrix.coverage
5360 uses : codecov/codecov-action@v3
5461 with :
5562 files : ./coverage.xml
5663 fail_ci_if_error : true
5764 - name : Building docs
58- if : matrix.python-version == 3.11
65+ if : matrix.default
5966 run : |
6067 sphinx-build --color -W --keep-going -b html docs build/sphinx/html
6168 sphinx-build --color -W --keep-going -b latex docs build/sphinx/latex
6269 make -C build/sphinx/latex all-pdf
6370 - name : Make packages
64- if : matrix.python-version == 3.11
71+ if : matrix.default
6572 run : python -m build
6673 - name : Archive production artifacts
67- uses : actions/upload-artifact@v3
68- if : matrix.python-version == 3.11
74+ uses : actions/upload-artifact@v4
75+ if : matrix.default
6976 with :
7077 path : |
7178 dist/
7481 coverage.xml
7582 build/coverage/html/
7683 - name : Publish package on PyPI
77- if : matrix.python-version == 3.11 && github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
84+ if : matrix.default && github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
7885 uses : pypa/gh-action-pypi-publish@release/v1
7986 with :
8087 user : __token__
0 commit comments