forked from pandas-dev/pandas
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TST/CI: Unify CI test scripts (single and multi) and simplify the sys…
…tem (pandas-dev#23924) * WIP: unifying script_single and script_multi * Unified scripts that run the tests (single and multi) * pending fixes * logging when we upload the coverage * Restoring pytest --skip-slow... options * Not running tests on doc build
- Loading branch information
1 parent
865ea62
commit 1b9ef63
Showing
10 changed files
with
72 additions
and
127 deletions.
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,52 @@ | ||
#!/bin/bash | ||
|
||
if [ "$DOC" ]; then | ||
echo "We are not running pytest as this is a doc-build" | ||
exit 0 | ||
fi | ||
|
||
# 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.