Skip to content

Commit ec499c6

Browse files
committed
fixup! Add Python to CI?
1 parent 3652f69 commit ec499c6

File tree

13 files changed

+50
-7
lines changed

13 files changed

+50
-7
lines changed

.coveragerc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[run]
2+
branch = True
3+
omit = rig_routing_tables/cffi_compile.py

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
.cache/*
55
build/*
66
*.egg-info/*
7-
tests/tests
7+
c_tests/tests
88
*.o
99
*.gcov
1010
*.gcda

.travis.yml

Lines changed: 43 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,55 @@
1-
sudo: false
2-
language: c
1+
# Travis Configuration based on that used for rig_c_sa
2+
sudo: false # Use the container based system
3+
language: generic # Make no assumptions about the environment
34

5+
# Install packages for building and running the test suite
46
addons:
57
apt:
68
packages:
79
- check
810
- valgrind
11+
- libffi-dev
12+
13+
# Test against a number of python versions
14+
env:
15+
matrix:
16+
- PYVER=2.7
17+
- PYVER=3.4
18+
- PYVER=3.5
19+
20+
21+
install:
22+
- git clone https://github.com/yyuu/pyenv.git ~/.pyenv
23+
- PYENV_ROOT="${HOME}/.pyenv"
24+
- PATH="$PYENV_ROOT/bin:$PATH"
25+
- eval "$(pyenv init -)"
26+
# Install the latest release of the specified Python version using pyenv.
27+
- PYVER="$(pyenv install --list | grep -E "^\\s*$PYVER" | sort -n -t. -k3 | tail -n1)"
28+
- echo "Selected Python $PYVER"
29+
- pyenv install $PYVER
30+
# Make the newly installed version the default "python" command.
31+
- pyenv global $PYVER
32+
- python --version
33+
# Install PIP
34+
- curl -O https://bootstrap.pypa.io/get-pip.py
35+
- python get-pip.py --user
36+
- pip install -r requirements-test.txt
937

1038
script:
11-
- cd ./tests
12-
- make coverage
39+
# Run the C tests first
40+
- cd c_tests
41+
- make coverage
42+
- cd -
43+
# Then check that the package can be built and run the tests
44+
- python setup.py develop
45+
- >
46+
py.test py_tests \
47+
--cov rig_routing_tables \
48+
--cov tests
49+
- flake8 rig_routing_tables tests
1350

1451
after_success:
15-
- bash <(curl -s https://codecov.io/bash)
52+
- bash <(curl -s https://codecov.io/bash)
1653

1754
notifications:
18-
email: false
55+
email: false
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)