-
-
Notifications
You must be signed in to change notification settings - Fork 18.3k
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
TST/CI: Unify CI test scripts (single and multi) and simplify the system #23924
Merged
Merged
Changes from 7 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
252729c
WIP: unifying script_single and script_multi
datapythonista be9fb9b
Merging from master
datapythonista 12bb059
Unified scripts that run the tests (single and multi)
datapythonista 9fac328
pending fixes
datapythonista 93c41db
logging when we upload the coverage
datapythonista 18446b2
Merge remote-tracking branch 'upstream/master' into unify_test_scripts
datapythonista a17a9ce
Restoring pytest --skip-slow... options
datapythonista 8c9b557
Not running tests on doc build
datapythonista File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#!/bin/bash | ||
|
||
# Workaround for pytest-xdist flaky collection order | ||
# https://github.com/pytest-dev/pytest/issues/920 | ||
# https://github.com/pytest-dev/pytest/issues/1075 | ||
export PYTHONHASHSEED=$(python -c 'import random; print(random.randint(1, 4294967295))') | ||
|
||
if [ -n "$LOCALE_OVERRIDE" ]; then | ||
export LC_ALL="$LOCALE_OVERRIDE" | ||
export LANG="$LOCALE_OVERRIDE" | ||
PANDAS_LOCALE=`python -c 'import pandas; pandas.get_option("display.encoding")'` | ||
if [[ "$LOCALE_OVERIDE" != "$PANDAS_LOCALE" ]]; then | ||
echo "pandas could not detect the locale. System locale: $LOCALE_OVERRIDE, pandas detected: $PANDAS_LOCALE" | ||
# TODO Not really aborting the tests until https://github.com/pandas-dev/pandas/issues/23923 is fixed | ||
# exit 1 | ||
fi | ||
fi | ||
if [[ "not network" == *"$PATTERN"* ]]; then | ||
export http_proxy=http://1.2.3.4 https_proxy=http://1.2.3.4; | ||
fi | ||
|
||
|
||
if [ -n "$PATTERN" ]; then | ||
PATTERN=" and $PATTERN" | ||
fi | ||
|
||
for TYPE in single multiple | ||
do | ||
if [ "$COVERAGE" ]; then | ||
COVERAGE_FNAME="/tmp/coc-$TYPE.xml" | ||
COVERAGE="-s --cov=pandas --cov-report=xml:$COVERAGE_FNAME" | ||
fi | ||
|
||
TYPE_PATTERN=$TYPE | ||
NUM_JOBS=1 | ||
if [[ "$TYPE_PATTERN" == "multiple" ]]; then | ||
TYPE_PATTERN="not single" | ||
NUM_JOBS=2 | ||
fi | ||
|
||
pytest -m "$TYPE_PATTERN$PATTERN" -n $NUM_JOBS -s --strict --durations=10 --junitxml=test-data-$TYPE.xml $TEST_ARGS $COVERAGE pandas | ||
|
||
if [[ "$COVERAGE" && $? == 0 ]]; then | ||
echo "uploading coverage for $TYPE tests" | ||
bash <(curl -s https://codecov.io/bash) -Z -c -F $TYPE -f $COVERAGE_FNAME | ||
fi | ||
done |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you have TEST_ARGS here, though you removed it elsewhere
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wanted to get rid of it, but it's needed in the numpydev build for the
-W error
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
any other way to do that. this makes it pretty clunky.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I want to take a look at pytest concurrency in a different PR.
I think it should be a simpler way to avoid running the
simple
tests in parallel, without having to call pytest twice. I think that would be cleaner, and we can simplify all this even more.Also, I want to see how many processes we have, and not call always for 2 (which I assume it's the number of cores in Travis), but instead use all the available (I think that should be as easy as
-n auto
, but I want to take a look at how many cores are detected in azure, and how many makes sense to use).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the single tests must remain though
we got failures because these are using single system resources