Add compatibility with Python 3.12 #49
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test | |
on: | |
push: { branches: [ "master" ] } | |
pull_request: { branches: [ "master" ] } | |
concurrency: | |
group: test-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | |
cython: ["cython", "cython<3.0.0"] | |
exclude: | |
- python-version: 3.12 | |
cython: cython<3.0.0 | |
steps: | |
- uses: actions/checkout@v2 | |
with: { submodules: recursive } | |
- uses: conda-incubator/setup-miniconda@v2 | |
with: { miniforge-variant: "Mambaforge", miniforge-version: "latest", python-version: "${{matrix.python-version}}" } | |
- name: Install pplpy dependencies | |
shell: bash -l {0} | |
run: | | |
mamba install --quiet setuptools cysignals ppl "${{matrix.cython}}" | |
conda list | |
- name: Install gmpy2 via mamba | |
if: ${{ matrix.python-version != '3.12' }} | |
run: | | |
mamba install --quiet gmpy2 | |
python -c 'import gmpy2; print(gmpy2.version())' | |
- name: Install gmpy2 via pip | |
if: ${{ matrix.python-version == '3.12' }} | |
run: | | |
pip install --pre gmpy2==2.2.0a1 | |
python -c 'import gmpy2; print(gmpy2.version())' | |
- name: Install pplpy | |
shell: bash -l {0} | |
run: | | |
pip install --verbose --no-index --no-build-isolation . | |
- name: Install test dependencies | |
run: | | |
mamba env update --quiet -n test -f environment.test.yml | |
conda list | |
- name: Linter | |
shell: bash -l {0} | |
run: | | |
cython-lint --ignore=E265,E266,E501,E741 --exclude='ppl_decl.pxd' ppl/ | |
- name: Run tests | |
shell: bash -l {0} | |
run: | | |
python setup.py test | |
- name: Show logs | |
run: grep "" /dev/null `find -name '*.log'` || true | |
if: ${{ always() }} |