Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install extras for testing via Tox, test with SciPy+PyPy only on Ubuntu #605

Merged
merged 2 commits into from
Aug 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 11 additions & 15 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,25 +31,21 @@ jobs:
- pypy-3.7
- pypy-3.8
- pypy-3.9
extras:
- none
- scipy
- pypy-3.10
exclude:
- { platform: windows-latest, python-version: pypy-3.7 }
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Python build tools
if: matrix.python-version != 'pypy-3.7' || matrix.platform != 'windows-latest'
run: python -m pip install tox-gh-actions wheel
- name: Workaround for PyPy 3.7 on Windows (tox-conda)
if: matrix.python-version == 'pypy-3.7' && matrix.platform == 'windows-latest'
run: python -m pip install tox-conda tox-gh-actions wheel
- name: Install optional dependencies (extras) on Linux/macOS
if: matrix.extras != 'none' && matrix.platform != 'windows-latest'
run: conda install -c anaconda ${{ matrix.extras }}
- name: Install optional dependencies (extras) on Windows
if: matrix.extras != 'none' && matrix.platform == 'windows-latest'
run: . ${env:CONDA}\scripts\conda.exe install -c anaconda ${{ matrix.extras }}
run: python -m pip install tox wheel
- name: Run tests
run: tox
run: tox run -e py
- name: Install Scipy prerequisites for Ubuntu
if: startsWith(matrix.platform, 'ubuntu')
run: sudo apt-get install libopenblas-dev
- name: Run tests with scipy
if: startsWith(matrix.platform, 'ubuntu') || startsWith(matrix.python-version, 'pypy') != true
run: tox run -e py-scipy
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = ["setuptools>=63"]
requires = ["setuptools>=44"]
build-backend = "setuptools.build_meta"

[project]
Expand Down
25 changes: 7 additions & 18 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,13 @@
[tox]
envlist =
ruff
py2{7}
pypy2{7}
py3{5,6,7,8,9,10,11}
pypy3{8,9}
py2{7}{,-scipy}
pypy2{7}{,-scipy}
py3{5,6,7,8,9,10,11}{,-scipy}
pypy3{8,9,10}{,-scipy}
package
clean

[gh-actions]
python =
2.7: py27
3.5: py35
3.6: py36
3.7: py37
3.8: py38
3.9: py39
3.10: py310
3.11: py311
pypy-2.7: pypy27
pypy-3.8: pypy38
pypy-3.9: pypy39
requires = virtualenv<20.22.0

[testenv]
description = Unit tests and test coverage
Expand All @@ -32,6 +19,8 @@ deps =
pypy27: mock
coverage[toml]
pytest
extras =
scipy: scipy
commands =
coverage run -m pytest {posargs}
coverage xml
Expand Down