-
Notifications
You must be signed in to change notification settings - Fork 188
/
.travis.yml
122 lines (105 loc) · 4.29 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
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.6"
apt:
packages:
- postgresql-server-dev-9.6
- texlive-base
- texlive-generic-recommended
- texlive-fonts-recommended
- texlive-latex-base
- texlive-latex-recommended
- texlive-latex-extra
- dvipng
- dvidvi
- graphviz
before_install:
# We need to replace `TRAVIS_HOME` with `HOME` because the former won't be set when SSH'ing to localhost on the
# the Travis machine, causing certain scripts sourced in the `.bashrc` to fail
- sed -i 's/TRAVIS_HOME/HOME/g' /home/travis/.travis/job_stages
# 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 --upgrade pip wheel setuptools coveralls
- pip install "numpy==1.16.4" # see https://github.com/materialsproject/pymatgen/issues/1520
- pip install "monty==2.0.4" # see https://github.com/materialsvirtuallab/monty/issues/49
# 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"
- AIIDA_TEST_BACKEND=django TEST_TYPE="docs"
- AIIDA_TEST_BACKEND=django TEST_TYPE="tests"
- AIIDA_TEST_BACKEND=sqlalchemy TEST_TYPE="tests"
- TEST_TYPE="conda"
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
jobs:
include:
- stage: deploy
if: "tag =~ ^v[0-9]+\\.[0-9]+\\.[0-9]+(a|b|rc)?[0-9]*$"
services: ignore
addons: skip
python: 3.6
before_install: skip
install: skip
before_script: skip
script: skip
env: ignore
before_deploy:
- echo "We'll deploy $TRAVIS_TAG"
after_deploy:
- echo "Deployed $TRAVIS_TAG"
- echo "We'll hook up some things in the future"
deploy: &pypi
provider: pypi
skip_existing: true
username: aiida-bot
password:
secure: NhV11e1kVJaumNMb7YGENngZwa6qJjzoGWzmzqdU5BwFgpXaxbaFAk2fn+Cckrkz4MmNJaW1HaKEAhn07WsbrkjOXK7QVNK48/eagiquKbCQbyNZNjzF+C24EYQHI93y40JQcl2JaCahSqKXbYQCpLlX0Rbtob4psQH29uHRcbq4lm5t3Jmb8WckEzcDLMZX3+uPFwDJxMbbsDW+pONGF1z2/B0j+7m4beTgCepuvIEaXS97rTQj2egKYEJV+V3DbH2o2nr0+3z4lzH2FAdoAnZMlFwHfWoY3WIuYcHcwXDWyLGWQKvncaoh1sLU7gfjjup3dZ4Iq74Zp43x2eXUhbmZBp2cPN3CZpN9baE4NE6MNKeQ/erkg31qdq50OG/rjGgPKyfg5ShO3Kt1CyVbSJX5dqPxtDQblYE8TAGhHfO2O8M1kLhyWvrV5TaQuVB/IAsTkRC+t1NtdWTxaU6wdMz36O5so89oKbFljjk9744m4Ei8DCgc98WH6b96qn0VifjxGuBs6o1aqRoa8O7e29a0TwDVAwxkczgjxbXkP6okRY5IAxsr5Rsbm8urXEo874uQA8n1gGyN6+YKSbjvPbHD9RIRl9IddC6y2wKTv/1JBifNjHcLhadl7RVRPSU7vFSs2cknN+5Gkw3FgZ/jA8SoMxMLFsvHcFxchrurAkE=
on:
repo: aiidateam/aiida-core
all_branches: true
tags: true
- stage: transifex_docs
if: "tag =~ ^v[0-9]+\\.[0-9]+\\.[0-9]+(a|b|rc)?[0-9]*$"
services: ignore
addons: skip
python: 3.6
before_install: skip
install: skip
before_script: skip
script: skip
env: ignore
after_success:
- .ci/transifex_upload.sh