forked from iiasa/ixmp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
65 lines (53 loc) · 1.39 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
# Continuous integration configuration for Travis
# NB use https://config.travis-ci.com/explore to validate changes
dist: xenial
language: r
r: release
# - Build against Python 3.7
# - Always display verbose exceptions in JDBCBackend
env:
PYENV=py37
IXMP_JDBC_EXCEPTION_VERBOSE=1
os:
- linux
- osx
# TODO turn this on once Travis Windows support improves
# - windows
r_packages:
- IRkernel
cache:
# Travis ensures these directories are created if they do not already exist
directories:
- $HOME/.conda/pkgs
- $HOME/.cache/ixmp
- $HOME/R/Library
addons:
apt:
packages:
- graphviz
homebrew:
packages:
- graphviz
before_install:
# Set other environment variables
- source ci/env.sh
# Download GAMS and Miniconda
- source ci/travis-before_install.sh
install:
# Install GAMS, conda, Python dependencies, and R packages needed for testing
- source ci/travis-install.sh
# Install the Python package
- pip install --editable .[docs,tests,tutorial]
# Install the R package
- Rscript -e "devtools::install('rixmp')"
script:
- python -c "import os, sys; assert os.environ['PYVERSION'] == sys.version[0]"
# Run tests. These include the equivalent of Travis R tests via test_r.py.
- pytest --test-r --verbose ixmp
# Test that documentation can be built
- cd doc
- pip install -r requirements.txt
- make html
after_success:
- coverage combine
- codecov