From 07ac7f80b607ce206985780f4fd71272a4dd8b6f Mon Sep 17 00:00:00 2001 From: Mikael Arguedas Date: Mon, 20 Jan 2020 11:19:39 +0100 Subject: [PATCH 1/5] test newer python Signed-off-by: Mikael Arguedas --- .travis.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.travis.yml b/.travis.yml index b5cf62067..27ab54836 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,6 +9,10 @@ matrix: python: 3.5 - os: linux python: 3.6 + - os: linux + python: 3.7 + - os: linux + python: 3.8 - os: osx language: generic env: PYTHON_INSTALLER=brew From 6c7fd6b69fded3b69a58fede78aa128d28640398 Mon Sep 17 00:00:00 2001 From: Mikael Arguedas Date: Mon, 20 Jan 2020 11:20:02 +0100 Subject: [PATCH 2/5] use yaml.safe_load Signed-off-by: Mikael Arguedas --- test/test_rosdep_lookup.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/test_rosdep_lookup.py b/test/test_rosdep_lookup.py index 30f26877a..e4648e51c 100644 --- a/test/test_rosdep_lookup.py +++ b/test/test_rosdep_lookup.py @@ -58,14 +58,14 @@ def create_test_SourcesListLoader(): def get_cache_raw(): cache_rosdep_path = os.path.join(get_cache_dir(), '0a12d6e7b0d47be9b76e7726720e4cb79528cbaa') with open(cache_rosdep_path) as f: - cache_raw = yaml.load(f.read()) + cache_raw = yaml.safe_load(f.read()) return cache_raw def get_cache_raw_python(): cache_rosdep_path = os.path.join(get_cache_dir(), 'f6f4ef95664e373cd4754501337fa217f5b55d91') with open(cache_rosdep_path) as f: - cache_raw = yaml.load(f.read()) + cache_raw = yaml.safe_load(f.read()) return cache_raw @@ -125,7 +125,7 @@ def test_RosdepDefinition(): pass # - test w/valid data - d2 = yaml.load(FAKE_TINYXML_RULE)['testtinyxml'] + d2 = yaml.safe_load(FAKE_TINYXML_RULE)['testtinyxml'] definition = RosdepDefinition('d2', d2, 'file2.txt') # - tripwire str(definition) From c5e48824e46badf2bd31f8d865d01c9500d0e39f Mon Sep 17 00:00:00 2001 From: Mikael Arguedas Date: Mon, 20 Jan 2020 11:20:57 +0100 Subject: [PATCH 3/5] pin PyYAML version for Python 3.4 Signed-off-by: Mikael Arguedas --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 27ab54836..898db081e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,7 @@ matrix: - os: linux python: 2.7 - os: linux - python: 3.4 + python: 3.4 # When support for 3.4 is removed unpin the PyYAML version below. - os: linux python: 3.5 - os: linux @@ -27,6 +27,7 @@ matrix: install: - source .travis/install.sh - python --version + - if [ $TRAVIS_PYTHON_VERSION == "3.4" ]; then python -m pip install PyYAML==5.2; fi # Forcing PyYAML 5.2 while we retain Python 3.4 support PyYAML 5.3 and higher does not support Python 3.4 - python -m pip install PyYAML argparse rospkg vcstools catkin_pkg python-dateutil rosdistro - python -m pip install -e . - python -m pip install nose coverage flake8 mock codecov From a183e242062daef5c0bcbe1a3bf2a5c238355f51 Mon Sep 17 00:00:00 2001 From: Mikael Arguedas Date: Mon, 20 Jan 2020 11:21:54 +0100 Subject: [PATCH 4/5] pass user flag to pip when needed Signed-off-by: Mikael Arguedas --- .travis.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 898db081e..e40bbacca 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,7 +15,9 @@ matrix: python: 3.8 - os: osx language: generic - env: PYTHON_INSTALLER=brew + env: + - PYTHON_INSTALLER=brew + - PIP_USER_FLAG="--user" - os: osx language: generic env: PYTHON_INSTALLER=pyenv TRAVIS_PYTHON_VERSION=2.7.14 @@ -28,9 +30,9 @@ install: - source .travis/install.sh - python --version - if [ $TRAVIS_PYTHON_VERSION == "3.4" ]; then python -m pip install PyYAML==5.2; fi # Forcing PyYAML 5.2 while we retain Python 3.4 support PyYAML 5.3 and higher does not support Python 3.4 - - python -m pip install PyYAML argparse rospkg vcstools catkin_pkg python-dateutil rosdistro - - python -m pip install -e . - - python -m pip install nose coverage flake8 mock codecov + - python -m pip install $PIP_USER_FLAG PyYAML argparse rospkg vcstools catkin_pkg python-dateutil rosdistro + - python -m pip install $PIP_USER_FLAG -e . + - python -m pip install $PIP_USER_FLAG nose coverage flake8 mock codecov # command to run tests script: - python -m nose --with-coverage --cover-package=rosdep2 --with-xunit test From 12eb82e265746bf227601d55b73a8348daf10d2a Mon Sep 17 00:00:00 2001 From: Mikael Arguedas Date: Mon, 20 Jan 2020 11:33:15 +0100 Subject: [PATCH 5/5] move slow jobs to the top to reduce CI time Signed-off-by: Mikael Arguedas --- .travis.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.travis.yml b/.travis.yml index e40bbacca..732ec7584 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,17 @@ language: python matrix: include: + - os: osx + language: generic + env: PYTHON_INSTALLER=pyenv TRAVIS_PYTHON_VERSION=2.7.14 + - os: osx + language: generic + env: PYTHON_INSTALLER=pyenv TRAVIS_PYTHON_VERSION=3.6.4 + - os: osx + language: generic + env: + - PYTHON_INSTALLER=brew + - PIP_USER_FLAG="--user" - os: linux python: 2.7 - os: linux @@ -13,17 +24,6 @@ matrix: python: 3.7 - os: linux python: 3.8 - - os: osx - language: generic - env: - - PYTHON_INSTALLER=brew - - PIP_USER_FLAG="--user" - - os: osx - language: generic - env: PYTHON_INSTALLER=pyenv TRAVIS_PYTHON_VERSION=2.7.14 - - os: osx - language: generic - env: PYTHON_INSTALLER=pyenv TRAVIS_PYTHON_VERSION=3.6.4 # command to install dependencies install: