Use nproc to specify xdist workers

This commit is contained in:
2024-11-09 22:52:25 -06:00
parent fa80bd0649
commit 058be9602a

View File

@@ -64,7 +64,7 @@ jobs:
run: |
cd backend
set -o pipefail # otherwise 'tee' will eat the exit code
poetry run pytest -n auto --color=yes --cov=linkpulse --cov-report=term-missing:skip-covered --junitxml=pytest.xml | tee pytest-coverage.txt
poetry run pytest -n $(nproc) --color=yes --cov=linkpulse --cov-report=term-missing:skip-covered --junitxml=pytest.xml | tee pytest-coverage.txt
# pytest-coverage-comment won't error if the files are missing
if [ ! -f ./pytest-coverage.txt ] || [ ! -f ./pytest.xml ]; then