forked from JuDFTteam/aiida-kkr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
72 lines (72 loc) · 2.85 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
#rabbitMQ only works with trusty according to travis website
dist: trusty
language: python
python:
- "2.7"
- "3.5"
- "3.6"
matrix:
# mark build as complete as soon as the versions that may not fail is finished
fast_finish: true
include:
- python: 3.7
dist: xenial
env: NO_RMQ='t'
notifications:
slack:
on_success: never
services:
- postgresql
- rabbitmq
addons:
postgresql: '9.5'
apt: # adapted from wannier90's travis.yml
packages:
- gfortran
- libblas-dev
- liblapack-dev
cache: pip
before_install:
# this decripts the secrets tar ball
- openssl aes-256-cbc -K $encrypted_6bf0778859c5_key -iv $encrypted_6bf0778859c5_iv -in secrets.tar.gz.enc -out secrets.tar.gz -d
# now unpack the secrets (pypi_credentials and ssh key to download the KKR code
- tar -zxvf secrets.tar.gz && rm secrets.tar.gz
# Now we install the needed dependencies
#- sudo apt-get update && sudo apt-get upgrade && sudo apt-get install software-properties-common -y && sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && sudo apt-get update && sudo apt-get install gfortran-8 -y && sudo apt-get update
- sudo apt-get install locate
- sudo service postgresql stop
- sudo apt-get remove postgresql
- sudo apt-get install postgresql-9.5
- sudo updatedb
install: # python installations
- pip install -U pip wheel setuptools
- pip install pip==18.1
# at the moment we take this branch which fixes issues encountered in aiida-core due to byte read/write and python2/3 issues
- pip install -e git+https://github.com/PhilippRue/aiida_core.git@5d9051124a14fdff8bc79f4bde953f598603d614#egg=aiida_core
- pip install -e .
- reentry scan
- pip install codecov
env:
- TEST_TYPE="unittests"
script:
# Clone JuKKR repository and build codes
# place the key where it is expected and make sure the connection works passwordless
- mv id_rsa_travis ~/.ssh/id_rsa
- chmod 400 ~/.ssh/id_rsa
- echo "iffgit.fz-juelich.de,134.94.161.83 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBH2UDrT0bZP+WmJGGbtLPtFyC5FgQgOM1XvVJ6u5XBJrYMnKNVb9jAttL+k8VvDgcK6b3dFJnvt7eiXtG/hnqCo=" >> ~/.ssh/known_hosts
# clone the code and install
- cd aiida_kkr/tests && ./jukkr_installation.sh
## First check if rabbitmq communication is working
#- ./check_pika-rabbitmq.py | tee out_rmq_check
#- ./verify_rmq_check.py
# choose tests to run via environment variables:
- export RUN_VORONOI='yes'
# Then run all tests
- bash ./run_all.sh
after_success:
- codecov
#deploy to pypi using poetry
- cd ../../ && rm -rf aiida_kkr/tests/{submit_test/,__pycache__/,jukkr} id_rsa_travis #remove test output before publishing
- pip install twine && ./publish_to_pypi.sh # publish_to_pypi script does not use poetry publish anymore since entrypoints are then not set correctly, use python setuy.py && twine upload instead
git:
depth: 3