-
Notifications
You must be signed in to change notification settings - Fork 3
/
.travis.yml
74 lines (71 loc) · 2.15 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
dist: bionic
sudo: false
language: python
cache: pip
services:
- postgresql
addons:
postgresql: 9.6
apt:
packages:
- postgresql-9.6-postgis-2.4
env:
global:
- LD_PRELOAD=/lib/x86_64-linux-gnu/libSegFault.so
- SEGFAULT_SIGNALS=all
- OEP_DB_USER="postgres" OEP_DB_PW="postgres"
- LOCAL_DB_USER="postgres" LOCAL_DB_PASSWORD="postgres"
- LOCAL_OEP_USER="user" LOCAL_OEP_TOKEN="token"
matrix:
- TOXENV=check
matrix:
include:
- python: '3.6'
env:
- TOXENV=py3
- python: '3.7'
env:
- TOXENV=py3
- python: '3.8'
env:
- TOXENV=py3
before_install:
- python --version
- uname -a
- lsb_release -a
- sudo apt-get update
install:
- pip install tox
- virtualenv --version
- easy_install --version
- pip --version
- tox --version
before_script:
- psql -U postgres -c 'CREATE DATABASE test;'
- psql -U postgres -c "CREATE EXTENSION postgis;" test
- psql -U postgres -c "CREATE DATABASE oedb"
- psql -U postgres -c "CREATE SCHEMA sandbox;" oedb
- psql -U postgres -c "CREATE SCHEMA _sandbox;" oedb
- psql -U postgres -c "CREATE SCHEMA test_schema;" oedb
- psql -U postgres -c "CREATE SCHEMA _test_schema;" oedb
- psql -U postgres -c "CREATE EXTENSION postgis;" oedb
- psql -U postgres -c "CREATE DATABASE oep_django"
- git clone https://github.com/OpenEnergyPlatform/oeplatform.git oep
- cd oep
- pip install -r requirements.txt
- cp oeplatform/securitysettings.py.default oeplatform/securitysettings.py
- python manage.py migrate
- python manage.py alembic upgrade head
- python manage.py shell -c "from login.models import myuser; u=myuser.objects.create_user(name='$LOCAL_OEP_USER',email='test@test.com',affiliation='');u.is_mail_verified=True;u.save()"
- LOCAL_OEP_TOKEN=`python manage.py shell -c "from login.models import Token;print(Token.objects.filter(user__name='$LOCAL_OEP_USER').first().key)"`
- python manage.py runserver &
- cd ..
script:
- LOCAL_OEP_TOKEN=$LOCAL_OEP_TOKEN OEDIALECT_PROTOCOL=http tox -v
after_failure:
- more .tox/log/* | cat
- more .tox/*/log/* | cat
notifications:
email:
on_success: never
on_failure: always