-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
119 lines (109 loc) · 3.91 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
dist: trusty # note rabbitmq is currently not available on xenial
language: python
cache: pip
services:
- postgresql
- rabbitmq
addons:
postgresql: "10.6"
apt:
packages:
- graphviz
matrix:
include:
- python: 3.6
env: TEST_TYPE="pre-commit"
- python: 3.6
env: TEST_TYPE="pytest" TEST_AIIDA_BACKEND="django" PYPI_DEPLOY=true
- python: 2.7
env: TEST_TYPE="pytest" TEST_AIIDA_BACKEND="django"
- python: 3.6
env: TEST_TYPE="pytest" TEST_AIIDA_BACKEND="sqlalchemy"
- python: 3.6
env: TEST_TYPE="docs" READTHEDOCS="True"
- python: 3.6
env: TEST_TYPE="conda"
# allow_failures:
# - env: TEST_TYPE="docs" READTHEDOCS="True"
install:
# Upgrade pip setuptools and wheel
- pip install --upgrade pip wheel setuptools "reentry>=1.3"
- pip install numpy==1.16.4 # otherwise numpy 1.17 is installed, which is incompatible with aiida-core==1.0.0b5
- |
if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
pip install typing==3.6.6 # otherwise importlib_resources installs incompatible version for aiida-core==1.0.0b5
fi
- |
if [[ "$TEST_TYPE" == "pre-commit" ]]; then
pip install -e .[code_style]
fi
- |
if [[ "$TEST_TYPE" == "pytest" ]]; then
pip install "notebook<5.5" # required by aiida-core->circus->pyzmq<17
pip install -e .[testing]
pip install coveralls
fi
- |
if [[ "$TEST_TYPE" == "docs" ]]; then
pip install -e .[docs]
url="https://github.com/jgm/pandoc/releases/tag/2.6"
path=$(curl -L $url | grep -o '/jgm/pandoc/releases/download/.*-amd64\.deb')
downloadUrl="https://github.com$path"
file=${path##*/}
wget $downloadUrl && sudo dpkg -i $file
fi
- |
if [[ "$TEST_TYPE" == "conda" ]]; then
# See https://conda.io/docs/user-guide/tasks/use-conda-with-travis-ci.html#the-travis-yml-file
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
bash miniconda.sh -b -p $HOME/miniconda
export PATH="$HOME/miniconda/bin:$PATH"
hash -r
conda config --set always_yes yes --set changeps1 no
conda update -q conda
# Useful for debugging any issues with conda
conda info -a
fi
before_script:
- |
if [[ "$TEST_TYPE" == "pytest" ]] || [[ "$TEST_TYPE" == "docs" ]]; then
reentry scan
fi
script:
- |
if [[ "$TEST_TYPE" == "pytest" ]]; then
pytest -v --cov=aiida_gulp --cov=examples --cov-config .coveragerc --cov-report= aiida_gulp
fi
- |
if [[ "$TEST_TYPE" == "pre-commit" ]]; then
pre-commit run --all-files || ( git status --short ; git diff ; exit 1 )
fi
- |
if [[ "$TEST_TYPE" == "docs" ]]; then
cd docs
make
fi
- |
if [[ "$TEST_TYPE" == "conda" ]]; then
travis_retry conda env create -f conda_dev_env.yml -n test-environment python=$TRAVIS_PYTHON_VERSION
conda list -n test-environment
source activate test-environment
pip install --no-deps -e .
reentry scan
verdi data gulp.potentials --help
fi
after_success:
- |
if [[ "$TEST_TYPE" == "pytest" ]]; then
coveralls
fi
deploy:
- provider: pypi
distributions: "sdist bdist_wheel"
user: cjsewell
password:
secure: SRUMt3dW9sepi3jYbcfc9vXxIRLPSDOFV8c2TmLbcrooocdwvgZKNyuIk5V8GnZFt1nBU+3q+w+SjaT5R3W2yYBXvUFkkkYyjRCxSByvRuECUa+4ohw5nhwffD4sSacprpBz+2e3o9zEp5jvFy6uzYZnIxjzeJzDnZM4bvVsFlHm5xZuojBVyutnEdDEDYRxA+i+L1x68mGwJK8nY086CqqbQwtJdvnP6dmi9kqqMKF5O7cIoxkY7dLP6ch4zGOn26tDAxBIsaYu8y8YpH2Gx9iiZHWTVmcnYgE205ZOh7iu5NWAnPx+1BqHr+XJh08AXLwQBSd7bKw0TRRuTIse1FlD/yFGNM2Coj2YXzUYnwiK68+4na1cieLi5rq4S9l8fzGliGOqxgT1ctGL/Uaj9PZBqte8Qoxu0eH77ZBeCj8vdlmC0atwK8pPbpMVEHcPh+9TUxXvCg9QB5eV3YkeHUJIBSAANzbGrLLpGSlROAD8TuXgZeGUiRLwWfQ3jMxfCRCjOszjdS/xHIBhP3H6vhlnXrgsY8zMMU/AG5QfVZ3YqWS8i9n5EYkr/1t0V5aa/duv7aHENzJ6PDpWvG35vpZJD2rcpGq84UULfi5pzUTba1UVsnod5xhePY+T7yDQteh9mMbHVmSJyHeImxfmYdX00OAhmmqrOxAj2FmJ2uw=
on:
branch: master
tags: true
condition: $PYPI_DEPLOY = true