Skip to content
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

Fix CI and reduce CI time #739

Merged
merged 5 commits into from
Mar 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 20 additions & 13 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,38 @@
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
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
python: 3.6
- os: osx
language: generic
env: PYTHON_INSTALLER=brew
- 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: linux
python: 3.7
- os: linux
python: 3.8

# command to install dependencies
install:
- source .travis/install.sh
- python --version
- 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
- 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 $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
Expand Down
6 changes: 3 additions & 3 deletions test/test_rosdep_lookup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down Expand Up @@ -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)
Expand Down