forked from cmu-db/ottertune
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
55 lines (46 loc) · 1.46 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
dist: trusty
sudo: required
language: python
python:
- "3.5.5"
services:
- rabbitmq
- mysql
addons:
apt:
sources:
- mysql-5.7-trusty
packages:
- mysql-server
- mysql-client
env:
global:
- DBNAME=ottertune
- DBUSER=root
- WEBSITE_ROOT=server/website
- COLON=":"
before_install:
- sudo apt-get -qq update
- sudo apt-get install -y python-pip python-dev python-mysqldb python-tk
- mysql -e "CREATE DATABASE IF NOT EXISTS ${DBNAME};"
- mysql -e "CREATE DATABASE IF NOT EXISTS test_${DBNAME};"
install:
- pip install -r ${WEBSITE_ROOT}/requirements.txt
- pip install coverage codecov
before_script:
- cp ${WEBSITE_ROOT}/website/settings/credentials_TEMPLATE.py
${WEBSITE_ROOT}/website/settings/credentials.py
- sed -i
-e "s/^DEBUG.*/DEBUG = True/"
-e "s/'USER'${COLON} 'ADD ME\!\!'/'USER'${COLON} '${DBUSER}'/"
-e "s/'PASSWORD'${COLON} 'ADD ME\!\!'/'PASSWORD'${COLON} ''/"
${WEBSITE_ROOT}/website/settings/credentials.py
- cat ${WEBSITE_ROOT}/website/settings/credentials.py
- python ${WEBSITE_ROOT}/manage.py migrate
script:
- cd ./client/controller && gradle build
- cd ../../server && python -m unittest discover -s analysis/tests -v
- cd ../${WEBSITE_ROOT} && coverage run manage.py test --noinput -v 2
- cd ../.. && python script/validators/source_validator.py
after_success:
- bash <(curl -s https://codecov.io/bash) || echo "Codecov did not collect coverage reports"