forked from colcon/colcon-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
32 lines (32 loc) · 1.52 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
language: python
python: "3.5"
dist: trusty
sudo: true
env:
- TEST_SUITE=pytest
- TEST_SUITE=bootstrap
install:
- pip install -U setuptools
# install_requires
- pip install -U distlib EmPy
# tests_require
- if [ "$TEST_SUITE" = "pytest" ]; then pip install -U flake8-blind-except flake8-builtins flake8-class-newline flake8-comprehensions flake8-deprecated flake8-docstrings flake8-quotes pep8-naming pylint pytest pytest-cov scspell3k; fi
# colcon test needs pytest-cov and pytest-runner
- if [ "$TEST_SUITE" = "bootstrap" ]; then pip install -U pytest pytest-cov pytest-rerunfailures pytest-repeat pytest-runner; fi
# for uploading the coverage information to codecov
- if [ "$TEST_SUITE" = "pytest" ]; then pip install codecov; fi
script:
# invoke pytest
- if [ "$TEST_SUITE" = "pytest" ]; then pytest --cov=colcon_core --cov-branch; fi
# build and test package using colcon itself
- if [ "$TEST_SUITE" = "bootstrap" ]; then ./bin/colcon build --build-base ../build --install-base ../install; fi
- if [ "$TEST_SUITE" = "bootstrap" ]; then sed -i '/ flake8-import-order/d' setup.cfg; fi
- if [ "$TEST_SUITE" = "bootstrap" ]; then ./bin/colcon test --build-base ../build --install-base ../install; fi
# use the installed package
- if [ "$TEST_SUITE" = "bootstrap" ]; then cd ../install; fi
- if [ "$TEST_SUITE" = "bootstrap" ]; then . local_setup.sh; fi
- if [ "$TEST_SUITE" = "bootstrap" ]; then colcon --help; fi
after_success:
- if [ "$TEST_SUITE" = "pytest" ]; then codecov; fi
notifications:
email: false