forked from aiidateam/aiida-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
76 lines (61 loc) · 2.01 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
73
74
75
76
dist: trusty
sudo: required
language: python
python:
- "2.7"
- "3.6"
cache: pip
services:
- rabbitmq
- postgresql
- docker
addons:
# make sure the path in .ci/test_script.sh matches the version requested here
postgresql: "9.5"
apt:
packages:
- postgresql-server-dev-9.5
- texlive-base
- texlive-generic-recommended
- texlive-fonts-recommended
- texlive-latex-base
- texlive-latex-recommended
- texlive-latex-extra
- dvipng
- dvidvi
- graphviz
before_install:
# This is needed for the SSH tests (being able to ssh to localhost)
# And will also be used for the docker test
- ssh-keygen -t rsa -N "" -f "${HOME}/.ssh/id_rsa"
- cp "${HOME}/.ssh/id_rsa.pub" "${HOME}/.ssh/authorized_keys"
- ssh-keyscan -H localhost >> "${HOME}/.ssh/known_hosts"
# Needed to have 'locate' work properly
- sudo updatedb
- .ci/prep_ssh.sh
# Build the docker image if needed
- .ci/before_install.sh
install:
# Upgrade pip setuptools and wheel to be able to run the next command
- pip install -U pip wheel setuptools
- pip install coveralls
# Install AiiDA with some optional dependencies
- if [ "$TEST_TYPE" == "docs" ]; then pip install . && pip install -r docs/requirements_for_rtd.txt; else pip install .[all]; fi
env:
## 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.
- TEST_TYPE="pre-commit"
- TEST_AIIDA_BACKEND=django TEST_TYPE="docs"
- TEST_AIIDA_BACKEND=django TEST_TYPE="tests"
- TEST_AIIDA_BACKEND=sqlalchemy TEST_TYPE="tests"
before_script:
- .ci/setup_profiles.sh
- .ci/before_script.sh
script: .ci/test_script.sh
after_success:
# upload coverage report to coveralls.io
- if [ "$TEST_TYPE" == "tests" ]; then coveralls; fi
git:
depth: 3