-
-
Notifications
You must be signed in to change notification settings - Fork 2
59 lines (57 loc) · 1.9 KB
/
test.yml
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
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 gmp mpfr mpc "${{matrix.cython}}"
- name: Install gmpy2 via mamba
shell: bash -l {0}
if: ${{ matrix.python-version != '3.12' }}
run: |
mamba install --quiet gmpy2
python -c 'import gmpy2; print(gmpy2.version())'
- name: Install gmpy2 via pip
shell: bash -l {0}
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() }}