forked from lsmo-epfl/aiida-zeopp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
83 lines (74 loc) · 3.11 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
language: python
python:
- "3.6"
- "2.7"
services:
- postgresql
- rabbitmq
addons:
postgresql: "10"
env:
global:
- AIIDA_VERSION: develop
- AIIDA_DEVELOP_GIT_HASH: 409a90d7c8ac8f26792c0f0fbc1f8567f2feb89a
# add network executable to PATH
#- PATH=${PATH}:${TRAVIS_BUILD_DIR}
# use 'network' script from .ci
- PATH=${PATH}:${TRAVIS_BUILD_DIR}/.ci
matrix:
- TEST_AIIDA_BACKEND: django
TEST_TYPE: tests
- TEST_AIIDA_BACKEND: sqlalchemy
TEST_TYPE: tests
- TEST_AIIDA_BACKEND: django
TEST_TYPE: pre-commit
before_install:
# Upgrade pip setuptools and wheel
- pip install -U wheel setuptools coveralls
- pip install pip==18.1
# install singularity
- wget -O- http://neuro.debian.net/lists/trusty.us-nh.full | sudo tee /etc/apt/sources.list.d/neurodebian.sources.list
- sudo apt-key add .travis.singularity_key.txt
- sudo apt-get update
- sudo apt-get install -y singularity-container
- singularity pull shub://ltalirz/singularity-recipe-zeopp:ansible
install:
- if [ "$AIIDA_VERSION" == "develop" ]; then .ci/install_aiida_github.sh ; fi # installs develop branch
- pip install -e .[testing,pre-commit]
- reentry scan -r aiida
# add fake network executable
#- cat "#!/bin/bash\necho 'network'" > network; chmod +x network
#- echo -e '#!/bin/bash\nset -e\nsingularity exec ./ltalirz-singularity-recipe-zeopp-master-ansible.simg /usr/local/bin/network "$@"' > network; chmod +x network
script:
- if [ "$TEST_TYPE" == "tests" ] ; then py.test --cov aiida_zeopp --cov-append . ; fi # runs unit tests
- 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
jobs:
include:
- stage: deploy
# Make sure the tag is valid semver
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 "About to deploy $TRAVIS_TAG to PyPI"
after_deploy:
- echo "Deployed $TRAVIS_TAG to PyPI"
deploy: &pypi
provider: pypi
skip_existing: true
username: aiida-bot
password:
# See https://docs.travis-ci.com/user/encryption-keys/ for instructions
secure: "SlXuoxLJscLdarij3Jnm3GCOfYBAFfknWPeeKMqh3MiA7Rc4pADN8RYbemp3lYZ1U/4PD64rHhmiIH8J5jY/UTjhW8P+9ONmyjVCtUdKZkx6fFNKyniQVnTbYGYnL8eyldKV9NYL2iKq0zMo8jfhOTXnejrN1i3U2zEYDGavz8VF5mZv+x/iKf+bhu8UO4GIQmcgJ3kObKuQXOtMNwuupdTEnRC2n/HGyOljoCnQ7eF9wmYABd+c9QmsKOKP29aajf7IqKKa8pO2XBd1ld9fw/l8IcLL53SSMc0kieket44nVxZIhQqbb3v8CSYfIFwspm5oM/AJ1BtYAA9tm+TfqnlxUhZajA6CpwJUPsygJ4mJ7jf02g3gClZd7gAEhhBxCDe2S0nF0x2nCJXJy2FQgPwOnIz0sgOeyncImW/BxBugfwItLY5nZdiNP00yga6mWxDnS9o6EPz54qrdZGQSaP1pbeWUatG3Xa4hBY7toIE86m4Ly1eH78OhqWiUrcxFTlQN4DUlU9pzq40DwzDd8MNd6tVCj9AYKGyUqCJihrHEjfsUBJ/X1t+jnnfxdQ7sL7MQK/xqF09/5lsW00dKOuQn/yosW69Bg8V8GKleVHwLAjSl0hQy0QJS9wGIT42OOvETpBWZGg1sg2mR3WQItFNFvT9vNvaZd/nIxwskcUs="
on:
repo: ltalirz/aiida-zeopp
branch: master
tags: true