forked from liangliangyy/DjangoBlog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
35 lines (35 loc) · 820 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
language: python
python:
- "3.4"
- "3.5"
- "3.6"
services:
- mysql
env:
global:
- DJANGO_SETTINGS_MODULE="travis_test.travis_settings"
matrix:
- DJANGO="Django==1.8"
- DJANGO="Django==1.9"
- DJANGO="Django==1.10"
- DJANGO="Django==1.11"
branches:
only:
- master
# command to install dependencies
install:
- pip install -r travis_test/requirements.txt
- pip install "$DJANGO"
- pip install python-coveralls
- pip install coverage
before_script:
- mysql -e 'CREATE DATABASE `djangoblog` /*!40100 DEFAULT CHARACTER SET utf8 */;'
- python manage.py makemigrations
- python manage.py migrate
- python manage.py collectstatic --noinput
- python manage.py compress --force
# command to run tests
script:
- coverage run manage.py test
after_success:
- coveralls