Skip to content

Commit

Permalink
fix: wheel tests
Browse files Browse the repository at this point in the history
Signed-off-by: mayeut <[email protected]>
  • Loading branch information
mayeut committed Feb 1, 2025
1 parent 1ba8667 commit ac19c53
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,7 @@ jobs:
uses: pypa/[email protected]
env:
CIBW_ARCHS: "${{ matrix.arch }}"
CIBW_ENABLE: "cpython-prerelease"
CIBW_TEST_EXTRAS: test
CIBW_TEST_COMMAND:
make -C {project} PYTHON="env python" PSUTIL_SCRIPTS_DIR="{project}/scripts" install-sysdeps install-pydeps-test install print-sysinfo test test-memleaks
CIBW_ENABLE: "${{ startsWith(github.ref, 'refs/tags/') && '' || 'cpython-prerelease' }}"

- name: Upload wheels
uses: actions/upload-artifact@v4
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ syntax: glob
build/
dist/
wheelhouse/
.tests/
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,12 @@ test-coverage: ## Run test coverage.
$(PYTHON) -m coverage html
$(PYTHON) -m webbrowser -t htmlcov/index.html

test-ci: install-sysdeps
mkdir -p .tests
cd .tests/ && $(PYTHON) -c "from psutil.tests import print_sysinfo; print_sysinfo()"
cd .tests/ && $(PYTHON_ENV_VARS) PYTEST_ADDOPTS="-k 'not test_memleaks.py'" $(PYTHON) -m pytest $(PYTEST_ARGS) --pyargs psutil.tests
cd .tests/ && $(PYTHON_ENV_VARS) PYTEST_ADDOPTS="-k 'test_memleaks.py'" $(PYTHON) -m pytest $(PYTEST_ARGS) --pyargs psutil.tests

# ===================================================================
# Linters
# ===================================================================
Expand Down
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,8 @@ skip = [
"cp3{7,8,9,10,11,12}-*linux_{aarch64,ppc64le,s390x}", # Only test cp36/cp313 on qemu tested architectures
"pp*",
]
test-extras = ["test"]
test-command = "make -C {project} PYTHON=python PSUTIL_SCRIPTS_DIR=\"{project}/scripts\" test-ci"

[tool.cibuildwheel.macos]
archs = ["arm64", "x86_64"]
Expand Down

0 comments on commit ac19c53

Please sign in to comment.