-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
49 lines (40 loc) · 1.58 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
sudo: required
language: python
python:
- 3.4
addons:
- firefox: "56.0.1"
services:
- postgresql
- elasticsearch
env:
- DJANGO=2.0.1
before_install:
- wget https://github.com/mozilla/geckodriver/releases/download/v0.19.0/geckodriver-v0.19.0-linux64.tar.gz
- mkdir geckodriver
- tar -xvf geckodriver-v0.19.0-linux64.tar.gz -C geckodriver
- export PATH=$PATH:$PWD/geckodriver
- export DJANGO_SETTINGS_MODULE=hashtagbrews.settings.test
- export PYTHONPATH="/home/travis/build/talaniz/hashtagbrews"
- export PIP_USE_MIRRORS=true
- export SECRET_KEY="Zbn;R*dU-#V(uYd4$%!\y'(Zbj-~wB"
- export DB_PASSWORD="@ntonio1"
install:
- pip install -r requirements.txt
- pip install django==$DJANGO --quiet
- pip install psycopg2 --quiet
before_script:
- psql -c "CREATE DATABASE hashtagbrews;" -U postgres
- psql -c "CREATE USER hashtagbrews PASSWORD '@ntonio1';" -U postgres
- psql -c "ALTER USER hashtagbrews CREATEDB;" -U postgres
- psql -c "GRANT ALL PRIVILEGES on DATABASE hashtagbrews to hashtagbrews;" -U postgres
- cp config/database.travis.yml config/database.yml
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- sleep 3 # give xvfb some time to start
script:
- python manage.py migrate --settings=hashtagbrews.settings.test
- python manage.py collectstatic --no-input --settings=hashtagbrews.settings.test
- python manage.py test homebrewdatabase.tests --settings=hashtagbrews.settings.test
- python manage.py test accounts.tests --settings=hashtagbrews.settings.test
- python manage.py test functional_tests --settings=hashtagbrews.settings.test