-
Notifications
You must be signed in to change notification settings - Fork 9
/
.travis.yml
73 lines (73 loc) · 1.7 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
language: python
python:
- 3.6
- 3.5
- 3.4
sudo: false
addons:
apt_packages:
- pandoc
env:
matrix:
- GROUP=python
matrix:
include:
- python: 3.5
env: GROUP=js
include:
- python: 3.6
env: GROUP=docs
cache:
pip: true
directories:
- node_modules # NPM packages
- $HOME/.npm
before_install:
- pip install -U pip setuptools
- nvm install 8
- |
if [[ $GROUP == python ]]; then
pip install codecov
elif [[ $GROUP == js ]]; then
npm install -g codecov
fi
install:
- |
if [[ $GROUP == python ]]; then
pip install --upgrade ".[test]" -v
elif [[ $GROUP == js ]]; then
pip install --upgrade -e ".[test]" -v
elif [[ $GROUP == docs ]]; then
pip install --upgrade ".[test, examples, docs]" -v
fi
before_script:
# Set up a virtual screen for Firefox browser testing:
- |
if [[ $GROUP == js ]]; then
export CHROME_BIN=chromium-browser
export DISPLAY=:99.0
sh -e /etc/init.d/xvfb start
fi
git config --global user.email [email protected]
git config --global user.name "Travis CI"
script:
- |
if [[ $GROUP == python ]]; then
EXIT_STATUS=0
pushd $(mktemp -d)
py.test -l --cov-report xml:$TRAVIS_BUILD_DIR/coverage.xml --cov=ipymidicontrols --pyargs ipymidicontrols || EXIT_STATUS=$?
popd
(exit $EXIT_STATUS)
elif [[ $GROUP == js ]]; then
npm test
elif [[ $GROUP == docs ]]; then
EXIT_STATUS=0
cd docs
make html || EXIT_STATUS=$?
make linkcheck || EXIT_STATUS=$?
cd ..
python -m pytest_check_links --links-ext=.md -o testpaths=. -o addopts= || EXIT_STATUS=$?
(exit $EXIT_STATUS)
fi
after_success:
- codecov