Skip to content

Commit

Permalink
Use pytest for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
andfoy committed Mar 3, 2025
1 parent dff5653 commit 5adc990
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,15 @@ permissions:
contents: read

env:
CIBW_BEFORE_BUILD: pip install setuptools oldest-supported-numpy
CIBW_BEFORE_BUILD: pip install setuptools oldest-supported-numpy pytest
CIBW_ENVIRONMENT: >
IS_FREETHREADED=$(python -c "import sysconfig;print(sysconfig.get_config_var('Py_GIL_DISABLED'))")
PYTEST_RUN_PARALLEL=$([ "$IS_FREETHREADED" == "1" ] && echo "pytest-run-parallel" || echo "")
PARALLEL_THREADS=$([ "$IS_FREETHREADED" == "1" ] && echo "--parallel-threads=4" || echo "")
CIBW_BEFORE_BUILD_LINUX: >
pip install setuptools oldest-supported-numpy pytest $PYTEST_RUN_PARALLEL
CIBW_BUILD_VERBOSITY: 1
CIBW_TEST_COMMAND: python -c "import sys, numexpr; sys.exit(0 if numexpr.test().wasSuccessful() else 1)"
CIBW_TEST_COMMAND: pytest $PARALLEL_THREADS numexpr/tests
CIBW_TEST_SKIP: "*macosx*arm64*"
# Building for musllinux and aarch64 takes way too much time.
# Moreover, NumPy is not providing musllinux for x86_64 either, so it's not worth it.
Expand Down

0 comments on commit 5adc990

Please sign in to comment.