forked from aiidateam/aiida-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
60 lines (49 loc) · 2.34 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
# Next two to activate the beta Ubuntu Trusty machine without sudo
# But apparently, SSH does not work, to check
#dist: trusty
#sudo: false
language: python
python:
- "2.7"
services:
- postgresql
addons:
postgresql: "9.4"
# postgresql: "9.5" # Available in Trusty only
apt:
packages:
- texlive-base
- texlive-generic-recommended
- texlive-fonts-recommended
- texlive-latex-base
- texlive-latex-recommended
- texlive-latex-extra
- dvipng
- dvidvi
## Build matrix to test both backends, and the docs
## I still let it create the test backend for django also when building the docs
## because otherwise the code would complain. Also, I need latex.
env:
- TEST_AIIDA_BACKEND=django COMPILE_DOCS=false
- TEST_AIIDA_BACKEND=sqlalchemy COMPILE_DOCS=false
- TEST_AIIDA_BACKEND=django COMPILE_DOCS=true
install:
# Upgrade pip setuptools and wheel to be able to run the next command
- pip install -U pip wheel setuptools
# Install AiiDA with some optional dependencies
- pip install .[verdi_shell,ssh,REST,docs,atomic_tools] --process-dependency-links
before_script:
# This is needed for the SSH tests (being able to ssh to localhost)
- ssh-keygen -t rsa -N "" -f "${HOME}/.ssh/id_rsa"
- cp "${HOME}/.ssh/id_rsa.pub" "${HOME}/.ssh/authorized_keys"
- if [ ! -d "${HOME}/.ssh/" ] ; then mkdir "${HOME}/.ssh/" ; fi
- ssh-keyscan -H localhost >> "${HOME}/.ssh/known_hosts"
# Here I create the test DB
- psql -c "CREATE DATABASE test_$TEST_AIIDA_BACKEND;" -U postgres
# Here I setup the test AiiDA profile, non-interactively
- verdi -p test_$TEST_AIIDA_BACKEND setup --non-interactive --backend=$TEST_AIIDA_BACKEND --email="aiida@localhost" --db_host="localhost" --db_port=5432 --db_name="test_$TEST_AIIDA_BACKEND" --db_user=postgres --db_pass='' --repo="/tmp/test_repository_test_${TEST_AIIDA_BACKEND}/" --first-name=AiiDA --last-name=test --institution="AiiDA Team" --no-password
script:
# Compile the docs (HTML format); -W to convert warnings in errors, -n to warn about all missing references
- if [[ "$COMPILE_DOCS" == "true" ]] ; then verdi profile setdefault verdi test_${TEST_AIIDA_BACKEND} && SPHINXOPTS="-nW" make -C docs html ; else verdi -p test_$TEST_AIIDA_BACKEND devel tests ; fi
git:
depth: 3