forked from CSCfi/metax-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
52 lines (40 loc) · 1.62 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
dist: trusty
language: python
python: 3.6
branches:
only:
- staging
- stable
- master
cache: pip
addons:
postgresql: '9.6'
services:
- postgresql
before_install:
- openssl aes-256-cbc -K $encrypted_596a6d1c4f83_key -iv $encrypted_596a6d1c4f83_iv -in deploy-key.enc -out deploy-key -d
- rm deploy-key.enc
- chmod 600 deploy-key
- mv deploy-key ~/.ssh/id_rsa
- eval "$(ssh-agent -s)"
- ssh-add ~/.ssh/id_rsa
install:
- pip install ansible
- pip install -r requirements.txt
- sudo service postgresql restart
before_script:
- psql -U postgres < resources/sql/init_test.sql
- sudo mkdir /var/log/metax-api
- sudo chown -R $USER:$USER /var/log/metax-api
script:
- cd src
- flake8 .
- python manage.py makemigrations metax_api
- python manage.py migrate metax_api
- coverage run --source="." manage.py test metax_api
- COVERALLS_REPO_TOKEN=$coveralls_token coveralls
notifications:
flowdock:
secure: j1VbRwvbQVl5IQ38NDFlVGgQOs/gbzfDVb7YF65ouJ/ad6+J/zSOBosD8QLnpz7d3Py97+4oy4ZnL7U6QMyW8hKezSCa7maAB5q/vPI6bDXpA8LQ8vvR8EcGa6gQHaWvgChlorDF2hNlyBCL8/LqU8p8c2sbETA+FCKgPJv9g4Zb9ag9eyq/BTC8YSVXqx8nd2knprLA5R8Wk/V93wJo5DGo4CVVXLba847ovt8NQ+pkVv2LskRA7wN/y7H+Un9fIpTjSFR0spD/JLHwMRRe463U45PZJ3S197leuomSscCpxTDNFFokLFJEird3NoDzR9Ny/2rmk+jsJKOf0P1iTniS7lZHzHG+GmWzoXWZaihJAnxYAyzyjLGkaz8aIJjNi/w5wuIKQXj1yLBaGJvply5O2VmNrr9sdhGmcbNZI0ZDTjKvmwir/uu1KGek1oKCh2M//6Zw/Ht5oCRkID5Qs21U5/onKJFJo/U7ZsVc8AJVKH0SqqVuQR24hYNlMr7aNYznXfVyuMX0oJXXKbtHGb+CPEqoMTRGYGUVMz1oMwlEbO0n51nbmmtF6co+WrzdHCyeHU+lC8MBR1cEpc2ZFIQ89ESJVDImKJw8+pJOpgu8DsiLFwrnwZ0c0xysQXEDS2pR+My0O4e0bY/WnADpA+JBy2e6fR/wVhXdUpRD2vs=
after_success:
- $TRAVIS_BUILD_DIR/.travis-deploy.sh