-
-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: infinite loop when climbing directories on Windows
- Loading branch information
1 parent
b8aab98
commit 9915c74
Showing
13 changed files
with
111 additions
and
56 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,55 @@ | ||
#!/usr/bin/env bash | ||
echo "Python version = $TRAVIS_PYTHON_VERSION" | ||
export ARG_OS_NAME=$1 | ||
export ARG_PYTHON_VERSION=$2 | ||
|
||
fix= | ||
test "$TRAVIS_PYTHON_VERSION" == '3.4' && fix=fix | ||
test "$TRAVIS_PYTHON_VERSION" == '3.5' && fix=fix | ||
echo "OS = $ARG_OS_NAME" | ||
echo "Python version = $ARG_PYTHON_VERSION" | ||
|
||
# Run all pre-commit hooks on Travis. | ||
if [[ "$fix" == 'fix' ]]; then | ||
python3 .travis/fix_pre_commit.py | ||
pre-commit run --all-files --config .travis/.temp-without-black.yaml | ||
else | ||
if [[ "$ARG_OS_NAME" == 'linux' && "$ARG_PYTHON_VERSION" == '3.7' ]]; then | ||
echo "Run all pre-commit hooks only on Python 3.7 Linux" | ||
pre-commit run --all-files | ||
|
||
echo "Running flake8 again for nitpick to check itself" | ||
poetry install # This is needed to install nitpick itself, not only the dependencies | ||
poetry run flake8 | ||
fi | ||
|
||
echo "Running flake8 again for nitpick to check itself" | ||
poetry install # This is needed to install nitpick itself, not only the dependencies | ||
flake8 | ||
if [[ "$ARG_OS_NAME" == 'linux' ]]; then | ||
echo "Running pytest with coverage report on Linux" | ||
poetry run coverage run --branch --parallel-mode --source=nitpick -m pytest | ||
else | ||
# TODO Several commands don't work on the Windows build on Travis. | ||
echo "Running pytest with coverage report on Windows" | ||
|
||
# Build freezes with message: | ||
# Spawning shell within C:\Users\travis\AppData\Local\pypoetry\Cache\virtualenvs\nitpick-py3.7 | ||
# poetry shell | ||
|
||
export PYTEST_DEBUG=1 | ||
# Build shows debug messages and freezes on this line: | ||
# early skip of rewriting module: text_unidecode [assertion] | ||
|
||
echo "Running coverage report" | ||
coverage run --branch --parallel-mode --source=nitpick -m pytest | ||
# Build fails with message: | ||
# No module named 'pytest' | ||
# /c/Users/travis/AppData/Local/pypoetry/Cache/virtualenvs/nitpick-py3.7/activate.bat | ||
|
||
# Build freezes with no message: | ||
# poetry run flake8 --help | ||
# poetry run flake8 | ||
|
||
coverage run --branch --parallel-mode --source=nitpick -m pytest | ||
# Build freezes on test collection: | ||
# ============================= test session starts ============================= | ||
# platform win32 -- Python 3.7.4, pytest-5.2.2, py-1.8.0, pluggy-0.13.0 -- c:\users\travis\appdata\local\pypoetry\cache\virtualenvs\nitpick-py3.7\scripts\python.exe | ||
# cachedir: .pytest_cache | ||
# rootdir: C:\Users\travis\build\andreoliwa\nitpick, inifile: setup.cfg | ||
# plugins: repeat-0.8.0, runfailed-0.6 | ||
# collecting ... | ||
|
||
# All builds fail after 10 minutes with this message: | ||
# No output has been received in the last 10m0s, this potentially indicates | ||
# a stalled build or something wrong with the build itself. | ||
# Check the details on how to adjust your build configuration on: | ||
# https://docs.travis-ci.com/user/common-build-problems/#build-times-out-because-no-output-was-received | ||
# The build has been terminated | ||
fi |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,13 +1,13 @@ | ||
[["pre-commit-config.yaml".repos]] | ||
yaml = """ | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v2.3.0 | ||
rev: v2.4.0 | ||
hooks: | ||
- id: debug-statements | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace | ||
- repo: https://github.com/asottile/pyupgrade | ||
rev: v1.25.0 | ||
rev: v1.25.1 | ||
hooks: | ||
- id: pyupgrade | ||
""" |
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