-
Notifications
You must be signed in to change notification settings - Fork 4
/
.travis.yml
108 lines (96 loc) · 2.68 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
---
# Configuration of integration tests on travis-ci.org
language: python
cache: pip
services:
- postgresql
- rabbitmq
addons:
postgresql: "9.6"
env:
global:
- TEST_AIIDA_BACKEND: django
# - AIIDA_DEVELOP_GIT_HASH: 7854680b268dcf29425a866256c9b34bdaa40ae5
# show timings of tests
# - PYTEST_ADDOPTS: --duration 0
matrix:
include:
# python27, stable aiida-core
- name: "python-2.7 stable (django)"
python: 2.7
env:
AIIDA_VERSION: stable
TEST_TYPE: tests
- name: "python-2.7 stable (sqla)"
python: 2.7
env:
AIIDA_VERSION: stable
TEST_TYPE: tests
TEST_AIIDA_BACKEND: sqlalchemy
# - name: "python-2.7 stable (docs)"
# python: 2.7
# env:
# AIIDA_VERSION: stable
# TEST_TYPE: docs
# READTHEDOCS: 'True'
# - name: "python-2.7 stable (pre-commit)"
# python: 2.7
# env:
# AIIDA_VERSION: stable
# TEST_TYPE: pre-commit
# python27, develop aiida-core
# - name: "python-2.7 develop (django)"
# python: 2.7
# env:
# AIIDA_VERSION: develop
# TEST_TYPE: tests
# - name: "python-2.7 develop (sqla)"
# python: 2.7
# env:
# AIIDA_VERSION: develop
# TEST_TYPE: tests
# TEST_AIIDA_BACKEND: sqlalchemy
# python36, develop aiida-core
- name: "python-3.6 stable (django)"
python: 3.6
env:
AIIDA_VERSION: stable
TEST_TYPE: tests
- name: "python-3.6 stable(sqla)"
python: 3.6
env:
AIIDA_VERSION: stable
TEST_TYPE: tests
TEST_AIIDA_BACKEND: sqlalchemy
# - name: "python-3.6 develop (docs)"
# python: 3.6
# env:
# AIIDA_VERSION: develop
# TEST_TYPE: docs
# READTHEDOCS: 'True'
# - name: "python-3.6 develop (pre-commit)"
# python: 3.6
# env:
# AIIDA_VERSION: develop
# TEST_TYPE: pre-commit
# Remove this to enforce the AiiDA coding style
allow_failures:
- TEST_TYPE: pre-commit
before_install:
# Upgrade pip setuptools and wheel
# pip 19.0.2 has problems
- pip install pip==18.1
- pip install -U wheel setuptools
install:
#- if [ "$AIIDA_VERSION" == "develop" ]; then .travis-data/install_aiida_github.sh ; fi # installs develop branch
- pip install -e .[testing]
- reentry scan -r aiida
# Doesn't work for me due to numpy.ufunc; however, works for Travis
#- pip install coveralls
script:
- if [ "$TEST_TYPE" == "tests" ] ; then py.test --ignore=examples/ --cov aiida_crystal --cov-append . ; fi # runs unit tests
- if [ "$TEST_TYPE" == "docs" ] ; then cd docs; make; fi # creates documentation
# runs precommit checks (failures allowed)
# - if [ "$TEST_TYPE" == "pre-commit" ] ; then pre-commit install; pre-commit run --all-files || ( git status --short; git diff ; exit 1 ); fi
#after_success:
#- coveralls