forked from colcon/colcon-bazel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
57 lines (48 loc) · 1.61 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
language: python
python: "3.5"
dist: trusty
sudo: true
env:
global:
- PKG=colcon_bazel
matrix:
- TEST_SUITE=pytest
- TEST_SUITE=bootstrap
before_install:
- sudo apt update && sudo apt install -y enchant
install:
- pip install -U setuptools
# install_requires
- pip install -U git+https://github.com/colcon/colcon-core
- pip install -U git+https://github.com/colcon/colcon-library-path
- pip install -U git+https://github.com/colcon/colcon-argcomplete
- pip install -U pyparsing argcomplete
# tests_require
- pip install -U flake8-blind-except flake8-builtins flake8-class-newline flake8-comprehensions flake8-deprecated flake8-docstrings flake8-quotes pep8-naming pyenchant pylint pytest pytest-cov
# for uploading the coverage information to codecov
- pip install codecov
script:
# invoke pytest
- if [ "$TEST_SUITE" = "pytest" ]; then pytest --cov=colcon_bazel --cov-branch; fi
# build and test package using colcon itself
- if [ "$TEST_SUITE" = "bootstrap" ]; then colcon build; fi
- if [ "$TEST_SUITE" = "bootstrap" ]; then colcon test; fi
# use the installed package
- if [ "$TEST_SUITE" = "bootstrap" ]; then . install/local_setup.sh; fi
- if [ "$TEST_SUITE" = "bootstrap" ]; then colcon --help; fi
after_failure:
- if [ "$TEST_SUITE" = "bootstrap" ]; then colcon test-result; fi
after_success:
- if [ "$TEST_SUITE" = "pytest" ]; then codecov; fi
notifications:
email: false
deploy:
provider: pypi
user: $PYPI_USER
password: $PYPI_PASS
skip_cleanup: true
distributions: "sdist bdist_wheel"
on:
tags: true
branch: master
condition: $TEST_SUITE = pytest