forked from DDMAL/Rodan
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
62 lines (62 loc) · 2.01 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
if: "(branch = master AND type IN (pull_request, cron)) OR (branch = develop)"
language: python
virtualenv:
system_site_packages: true
cache: pip
services:
- redis-server
addons:
postgresql: '9.5'
apt:
packages:
- postgresql-plpython-9.5
matrix:
include:
- os: linux
sudo: required
python: 2.7
before_install:
- sudo apt-get update -qy
- sudo /etc/init.d/postgresql restart
- sudo pip install redis
- sudo redis-server /etc/redis/redis.conf --port 6379
- export REDIS_HOST=localhost
- export REDIS_PORT=6379
- export REDIS_DB=0
- export RABBITMQ_URL=amqp://guest_user:guest_pass@localhost:5672//
- export RABBITMQ_DEFAULT_USER=guest_user
- export RABBITMQ_DEFAULT_PASS=guest_pass
- export DJANGO_DEBUG_MODE=True
- export DJANGO_SECRET_KEY=local
- export DJANGO_ALLOWED_HOSTS=*
- export DJANGO_MEDIA_ROOT=./data/
- export CELERY_JOB_QUEUE=None
- export POSTGRES_HOST=localhost
- export POSTGRES_PORT=5432
- export POSTGRES_DB=rodan
- export POSTGRES_USER=rodan
- export POSTGRES_PASSWORD=rodan
install:
- pip install -r requirements.txt
- pip install flake8
- sudo chmod -R 755 /home/travis/virtualenv/python2.7_with_system_site_packages/local/lib/python2.7/site-packages/pybagit
- cd ./rodan/jobs && git clone https://github.com/DDMAL/pil-rodan.git && cd ../..
- sed -i "s/\/code\/Rodan/./g" rodan/settings.py
before_script:
- psql -c "CREATE DATABASE rodan;" -U postgres
- psql -c "CREATE USER rodan WITH PASSWORD 'rodan';" -U postgres
- psql -c "ALTER USER rodan WITH SUPERUSER;" -U postgres
- psql -c "CREATE LANGUAGE plpython2u;" -U postgres
- psql -c "GRANT ALL PRIVILEGES ON DATABASE "rodan" TO rodan;" -U postgres
- python manage.py makemigrations rodan
- python manage.py migrate
script:
- flake8
# - python -W error manage.py test
# - python -W once manage.py test
- python manage.py test
notifications:
email: false
slack:
rooms:
secure: HDF/98yAM+vTFndMuwkHfnUfWfdcU5E0Wjkccn9jrJg2FiaW+SxoT7Gb/PBoWmYWke0BIEERop0khfEOlsa/n3d7N0eZcZ6IrJa2PDnyP6C9QK/wiagl2uC3NZeCVHuz7aXI2iRYcSjQt7iXlSfQqczhov4qhfhDwNZoddotWNU=