-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy path.travis.yml
50 lines (50 loc) · 1.45 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
dist: xenial
language: python
cache: pip
python:
- "3.5"
- "3.6"
- "3.7"
- "3.8"
env:
- DB=sqlite3 DJANGO=1.11
- DB=mysql DJANGO=1.11
- DB=postgres DJANGO=1.11
- DB=sqlite3 DJANGO=2.0
- DB=mysql DJANGO=2.0
- DB=postgres DJANGO=2.0
- DB=sqlite3 DJANGO=2.1
- DB=mysql DJANGO=2.1
- DB=postgres DJANGO=2.1
- DB=sqlite3 DJANGO=2.2
- DB=mysql DJANGO=2.2
- DB=postgres DJANGO=2.2
- DB=sqlite3 DJANGO=3.0
- DB=mysql DJANGO=3.0
- DB=postgres DJANGO=3.0
jobs:
exclude:
- python: "3.5"
env: DB=sqlite3 DJANGO=3.0
- python: "3.5"
env: DB=mysql DJANGO=3.0
- python: "3.5"
env: DB=postgres DJANGO=3.0
install:
- pip install . --no-deps
- pip install --no-deps -r test_project/requirements-$DJANGO.txt
- pip install flake8
- if [ $DB == 'mysql' ]; then pip install --no-deps mysqlclient==1.4.6; fi
- if [ $DB == 'postgres' ]; then pip install --no-deps psycopg2-binary==2.8.4; fi
before_script:
- "flake8 --ignore=E501,E731,W504 daguerre"
- if [ $DB == 'mysql' ]; then sudo service mysql start; fi
- if [ $DB == 'mysql' ]; then mysql -e 'CREATE DATABASE daguerre_test;'; fi
- if [ $DB == 'postgres' ]; then sudo service postgresql start; fi
- if [ $DB == 'postgres' ]; then psql -c 'drop database if exists daguerre_test;'
-U postgres; fi
- if [ $DB == 'postgres' ]; then psql -c 'create database daguerre_test;' -U postgres;
fi
script:
- cd test_project
- ./manage.py test --verbosity=2 daguerre