feat: switch to tox for tests

This commit is contained in:
David Huggins-Daines
2023-12-28 12:34:11 -05:00
parent 4ed00036b4
commit 42919d26a6
5 changed files with 53 additions and 20 deletions
+30 -13
View File
@@ -33,19 +33,36 @@ jobs:
- name: Run tests
run: |
cmake --build build --target check
pytest:
runs-on: ubuntu-latest
python-tests:
name: test with ${{ matrix.py }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
py:
- "3.12"
- "3.11"
- "3.10"
- "3.9"
- "3.8"
os:
- ubuntu-latest
- macos-latest
- windows-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install
run: |
sudo apt-get install sox
python -m pip install --upgrade pip
pip install -r requirements.dev.txt
pip install .
- name: Run tests
run: pytest
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup python for test ${{ matrix.py }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.py }}
- name: Install tox
run: python -m pip install tox-gh>=1.2
- name: Setup test suite
run: tox -vv --notest
- name: Run test suite
run: tox --skip-pkg-install
pytest-editable:
runs-on: ubuntu-latest
steps:
@@ -55,7 +72,7 @@ jobs:
run: |
sudo apt-get install sox
python -m pip install --upgrade pip
pip install -r requirements.dev.txt
pip install pytest memory_profiler
pip install -e .
- name: Run tests
run: pytest
+1
View File
@@ -13,3 +13,4 @@ CTestTestfile.cmake
DartConfiguration.tcl
cmake_install.cmake
.tox
+1 -1
View File
@@ -3,7 +3,7 @@ version: 2
build:
os: ubuntu-22.04
tools:
python: "3.9"
python: "3.10"
sphinx:
configuration: docs/source/conf.py
-6
View File
@@ -1,6 +0,0 @@
cmake~=3.22.0
scikit-build~=0.15.0
Cython~=0.29.0
setuptools>=45.0.0
pytest~=7.0.0
memory-profiler==0.60.0
+21
View File
@@ -0,0 +1,21 @@
[tox]
env_list = py{38,39,310,311,312}
minversion = 4.11.4
[testenv]
description = run the tests with pytest
package = wheel
wheel_build_env = .pkg
deps =
pytest>=6
memory_profiler
commands =
pytest {tty:--color=yes} {posargs}
[gh]
python =
3.12 = py312
3.11 = py311
3.10 = py310
3.9 = py39
3.8 = py38