Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ozekik committed Sep 26, 2023
1 parent 085ae2d commit dceb14e
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 14 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,17 @@ jobs:
args: --release --out dist --find-interpreter
sccache: 'true'
manylinux: auto
- name: Run tests
# NOTE: aarch64 is built on docker, so we cannot run tests on it
if: "matrix.target != 'aarch64'"
shell: bash
# TODO: Run on all Python versions
run: |
python3.10 -m pip install --upgrade pip
python3.10 -m pip install pytest~=7.4.2
python3.10 -m pip install dist/*cp310*${{ matrix.wheel_arch || matrix.target }}*.whl
cd tests/
python3.10 -m pytest .
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
Expand All @@ -89,6 +100,9 @@ jobs:
matrix:
# target: [x64, x86]
target: [x64]
include:
- target: x64
wheel_arch: amd64
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
Expand All @@ -101,6 +115,16 @@ jobs:
target: ${{ matrix.target }}
args: --release --out dist --find-interpreter
sccache: 'true'
- name: Run tests
shell: bash
# TODO: Run on all Python versions
# NOTE: There is no versioned Python executables on Windows
run: |
python -m pip install --upgrade pip
python -m pip install pytest~=7.4.2
python -m pip install dist/*cp310*${{ matrix.wheel_arch || matrix.target }}*.whl
cd tests/
python -m pytest .
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
Expand All @@ -113,6 +137,9 @@ jobs:
strategy:
matrix:
target: [x86_64, aarch64]
include:
- target: aarch64
wheel_arch: arm64
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
Expand All @@ -124,6 +151,17 @@ jobs:
target: ${{ matrix.target }}
args: --release --out dist --find-interpreter
sccache: 'true'
- name: Run tests
# NOTE: We cannnot run tests for aarch64 (arm64)
if: "matrix.target != 'aarch64'"
shell: bash
# TODO: Run on all Python versions
run: |
python3.10 -m pip install --upgrade pip
python3.10 -m pip install pytest~=7.4.2
python3.10 -m pip install dist/*cp310*${{ matrix.wheel_arch || matrix.target }}*.whl
cd tests/
python3.10 -m pytest .
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
Expand Down
19 changes: 5 additions & 14 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,12 @@
envlist = py38,py39,py310,py311
skip_missing_interpreters = true
isolated_build = true
requires = tox-pyo3

[gh-actions]
python =
3.8: py38
3.9: py39
3.10: py310
3.11: py311

[testenv]
allowlist_externals = maturin
deps =
pytest ~= 6.1.1
pytest ~= 7.4.2
commands_pre =
maturin develop --release
commands =
poetry install
poetry run pytest --cache-clear tests/
pyo3 = true
whitelist_externals = poetry
skip_install = true
pytest --cache-clear tests/

0 comments on commit dceb14e

Please sign in to comment.