From 4084c5c321d51b87bc6b5e4ee3635363fb9a180e Mon Sep 17 00:00:00 2001 From: Javier Romero Castro Date: Tue, 7 Jul 2020 11:11:48 +0200 Subject: [PATCH] isort: fix compatibility with isort v5 * fix CLI arguments for isort v5 --- .travis.yml | 7 ++++++- {{cookiecutter.project_shortname}}/.travis.yml | 7 ++++++- {{cookiecutter.project_shortname}}/run-tests.sh | 2 +- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 14e5032..b747855 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,6 +20,9 @@ notifications: language: python +node_js: + - 10 + matrix: fast_finish: true @@ -49,13 +52,15 @@ python: - "3.6" before_install: + # Upgrade Travis `numpy` version: default is vulnerable and pipenv check will fail otherwise + - pip uninstall numpy -y + - pip install --ignore-installed "numpy>=1.18" # Stop the services running by default on travis - "sudo service mysql stop" - "sudo service postgresql stop" # Chrome webdriver for Selenium - "PATH=$PATH:$HOME/webdrivers" - "if [ ${E2E} == 'yes' ] && [ ! -f $HOME/webdrivers/chromedriver ]; then wget https://chromedriver.storage.googleapis.com/2.31/chromedriver_linux64.zip -P $HOME/webdrivers; unzip -d $HOME/webdrivers $HOME/webdrivers/chromedriver_linux64.zip; fi" - - "nvm install 6; nvm use 6" - "travis_retry pip install --upgrade pip setuptools py pipenv" - "travis_retry pip install cookiecutter twine wheel coveralls sphinx" diff --git a/{{cookiecutter.project_shortname}}/.travis.yml b/{{cookiecutter.project_shortname}}/.travis.yml index 27f3710..50b4ae8 100644 --- a/{{cookiecutter.project_shortname}}/.travis.yml +++ b/{{cookiecutter.project_shortname}}/.travis.yml @@ -15,6 +15,9 @@ notifications: language: python +node_js: + - 10 + matrix: fast_finish: true @@ -30,6 +33,9 @@ env: - E2E_OUTPUT=base64 # Enable end-to-end tests - E2E=no + # Force pipenv to create a new virtualenv to bypass travis virtualenv. + - PIPENV_IGNORE_VIRTUALENVS=1 + - PIPENV_PYUP_API_KEY="" matrix: - REQUIREMENTS=prod E2E=yes - REQUIREMENTS=qa @@ -46,7 +52,6 @@ before_install: # Chrome webdriver for Selenium - "PATH=$PATH:$HOME/webdrivers" - "if [ ${E2E} == 'yes' ] && [ ! -f $HOME/webdrivers/chromedriver ]; then wget https://chromedriver.storage.googleapis.com/2.31/chromedriver_linux64.zip -P $HOME/webdrivers; unzip -d $HOME/webdrivers $HOME/webdrivers/chromedriver_linux64.zip; fi" - - "nvm install 6; nvm use 6" - "travis_retry pip install --upgrade pip setuptools py pipenv" - "travis_retry pip install twine wheel coveralls" diff --git a/{{cookiecutter.project_shortname}}/run-tests.sh b/{{cookiecutter.project_shortname}}/run-tests.sh index 1d96219..9b02fc2 100755 --- a/{{cookiecutter.project_shortname}}/run-tests.sh +++ b/{{cookiecutter.project_shortname}}/run-tests.sh @@ -3,7 +3,7 @@ pipenv check && \ pipenv run pydocstyle {{ cookiecutter.package_name }} tests docs && \ -pipenv run isort -rc -c -df && \ +pipenv run isort --check-only --diff && \ pipenv run check-manifest --ignore ".travis-*,docs/_build*" && \ pipenv run sphinx-build -qnNW docs docs/_build/html && \ pipenv run test