forked from cclib/cclib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
65 lines (57 loc) · 1.85 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
language: python
python:
- 2.7
- 3.5
- 3.7
addons:
apt:
packages:
- swig
cache:
pip: true
directories:
- $HOME/miniconda
before_install:
- sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu cosmic universe"
- sudo apt update
- sudo apt install libopenbabel-dev
- |
if [[ $(echo "$TRAVIS_PYTHON_VERSION >= 3.6" | bc -l) == 1 ]];
then
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
bash miniconda.sh -b -p $HOME/miniconda -u
export PATH="$HOME/miniconda/bin:$PATH"
hash -r
conda config --set always_yes yes --set changeps1 no
conda update -q conda
conda info -a
conda create -q -n p4env python=$TRAVIS_PYTHON_VERSION ci-psi4 psi4 numpy matplotlib jupyter scipy -c psi4/label/dev -c defaults -c conda-forge
source activate p4env
conda install pytest pytest-cov codecov -c conda-forge
pip install pytest-shutil
conda list
fi
pip install -r requirements.txt
install:
- pip install .
before_script:
- |
export DOCS_BRANCH_NAME=master
export DOCS_REPO_NAME=cclib.github.io
export DOCS_REPO_OWNER=cclib
export DOCS_ROOT_DIR="${TRAVIS_BUILD_DIR}"/doc/sphinx
export DOCS_BUILD_DIR="${DOCS_ROOT_DIR}"/_build/html
export THEME_DIR="${DOCS_ROOT_DIR}"/_themes
- install -dm755 "${THEME_DIR}"
script:
- env | sort
- bash travis/run_pytest.bash
- bash travis/build_docs.bash
after_success:
- |
if [[ "${TRAVIS_BRANCH}" == master && "${TRAVIS_PULL_REQUEST}" == false && $(echo "$TRAVIS_PYTHON_VERSION == 3.7" | bc -l) == 1 ]];
then
# Commits to master that are not pull requests, that is, only actual
# addition of code to master, should deploy the documentation.
bash ${TRAVIS_BUILD_DIR}/travis/deploy_docs_travis.bash
fi