forked from qucat/qucat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
70 lines (54 loc) · 2.12 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
language: python
# this is needed to run tests requiring a graphical user interface
# see https://docs.travis-ci.com/user/gui-and-headless-browsers/
dist: xenial
services:
- xvfb
addons:
apt_packages:
# required to build the documentation
- pandoc
python:
- "3.7.3"
install:
# setup conda, which is necessary to install qutip
# just copied in the conda code from https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/use-conda-with-travis-ci.html#
- wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
- hash -r
- conda config --set always_yes yes --set changeps1 no
- conda update -q conda
- conda info -a
# environment in which we will be testing the pip installation from source
- conda create -q -n pip-environment-source python=$TRAVIS_PYTHON_VERSION
# environment in which we will be testing the pip installation from the package index
- conda create -q -n pip-environment-index python=$TRAVIS_PYTHON_VERSION
# environment in which we will be running the docs building
- conda create -q -n docs-environment python=$TRAVIS_PYTHON_VERSION sphinx
# environment in which we will be running the tests
# Here we also install all dependencies of qucat manually
- conda create -q -n test-environment python=$TRAVIS_PYTHON_VERSION numpy scipy matplotlib sympy pillow nbformat pytest pytest-cov codecov
# Install qutip
- source activate test-environment
- conda config --append channels conda-forge
- conda install qutip
script:
# Test pip installation from the index
- source activate pip-environment-index
- pip install qucat
- python -c "import qucat"
# Test documentation build
- source activate docs-environment
- pip install nbsphinx
- pip install recommonmark
- pip install sphinx_rtd_theme
- python build_docs.py
# Run tests
- source activate test-environment
- pytest --cov=src
- codecov
# Test pip installation from source
- source activate pip-environment-source
- pip install .
- python -c "import qucat"