/
.travis.yml
44 lines (35 loc) · 1.06 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
# vim: sw=2 ts=2 sts=2 expandtab
dist: bionic
sudo: true
language: python
services:
- docker
matrix:
include:
- env:
- DB=mariadb:10.4
python: "3.7"
install:
- pip install -r requirements.txt
before_script:
# Setup the database
- ./.travis/initializedb.sh
- python -VV
- rm -f ~/.my.cnf # set in .travis.initializedb.sh for the above commands - we should be using database.json however
# Setup Django settings
- cp settings/.env.example settings/.env
- sed -i.bak -e "s/DATABASE_URL=.*/DATABASE_URL=mysql:\/\/test2:some password@127.0.0.1:3306\/test2/g" settings/.env;
- sed -i.bak -e "s/DEBUG=.*/DEBUG=False/g" settings/.env;
- rm settings/.env.bak
- grep -R "DATABASE_URL" settings/.env
# Collectstatic
- python manage.py collectstatic --noinput -i node_modules -i gulpfile.js -i package.json -i package-lock.json
script:
- python manage.py test accounts.tests
- python manage.py test catalogue.tests
notifications:
email:
recipients:
- halbesma@MPA-Garching.MPG.DE
on_success: change
on_failure: change