Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable python-xdist on all tests #2059

Merged
merged 2 commits into from
Feb 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading