forked from cytoscape/ipycytoscape
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
72 lines (72 loc) · 1.62 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
language: python
python:
- 3.8
- 3.7
- 3.6
sudo: false
dist: xenial
services:
- xvfb
addons:
apt_packages:
- pandoc
env:
matrix:
- GROUP=python
matrix:
include:
- python: 3.6
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 12
- |
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
fi
git config --global user.email [email protected]
git config --global user.name "Travis CI"
script:
- |
if [[ $GROUP == python ]]; then
EXIT_STATUS=0
pytest -l --cov-report xml:$TRAVIS_BUILD_DIR/coverage.xml --cov=ipycytoscape || EXIT_STATUS=$?
(exit $EXIT_STATUS)
elif [[ $GROUP == js ]]; then
npm run lint-check
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