Skip to content

Commit

Permalink
Enable python-xdist on all tests (#2059)
Browse files Browse the repository at this point in the history
* Enable python-xdist on all tests

* Use only 4 workers
  • Loading branch information
bmuskalla authored Feb 29, 2024
1 parent 9902a21 commit 92fc81a
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/python-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,13 @@ jobs:
"Repository only")
# Run repo tests concurrently
PYTEST="$PYTEST ../tests -k 'TestRepository' -n4"
PYTEST="$PYTEST ../tests -k 'TestRepository' -n 4"
echo $PYTEST
eval $PYTEST
;;
"Everything else")
PYTEST="$PYTEST ../tests -k 'not TestRepository'"
PYTEST="$PYTEST ../tests -k 'not TestRepository' -n 4"
echo $PYTEST
eval $PYTEST
;;
Expand Down Expand Up @@ -156,7 +156,6 @@ jobs:
run: |
pip install --upgrade pip
pip install .[testing]
# sudo apt install -y libsndfile1-dev
# Easy debugging if CI is broken
- name: Pip freeze
Expand All @@ -165,7 +164,7 @@ jobs:
# Run tests
- name: Run tests
working-directory: ./src # For code coverage to work
run: python -m pytest --cov=./huggingface_hub --cov-report=xml:../coverage.xml --vcr-record=none --reruns 5 --reruns-delay 1 --only-rerun '(OSError|Timeout|HTTPError.*502|HTTPError.*504|not less than or equal to 0.01)' ../tests
run: python -m pytest -n 4 --cov=./huggingface_hub --cov-report=xml:../coverage.xml --vcr-record=none --reruns 5 --reruns-delay 1 --only-rerun '(OSError|Timeout|HTTPError.*502|HTTPError.*504|not less than or equal to 0.01)' ../tests

# Upload code coverage
- name: Upload coverage reports to Codecov with GitHub Action
Expand Down

0 comments on commit 92fc81a

Please sign in to comment.