forked from apel/rest
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
38 lines (32 loc) · 935 Bytes
/
.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
language: python
python:
- "2.6"
- "2.7"
- "nightly"
matrix:
allow_failures:
- python: "nightly"
fast_finish: true
# use the mysql service
services:
- mysql
# Route build to container-based infrastructure
sudo: false
# Cache the dependencies installed by pip
cache: pip
# Avoid pip log from affecting cache
before_cache: rm -fv ~/.cache/pip/log/debug.log
install:
- pip install -r requirements.txt
- pip install -r test_requirements.txt
# Commands that prepare things for the test
before_script:
# create an empty mysql database
- mysql -u root -e "create database apel_rest"
- mysql -u root apel_rest < schemas/10-cloud.sql
# partition the database, at least to make sure the syntax is correct
- mysql -u root apel_rest < schemas/20-cloud-extra.sql
- export PYTHONPATH=$PYTHONPATH:`pwd -P`
# Command to run tests
script: coverage run --branch --source='.' manage.py test
after_success: coveralls