-
Notifications
You must be signed in to change notification settings - Fork 89
Expand file tree
/
Copy path.travis.yml
More file actions
52 lines (51 loc) · 1.51 KB
/
Copy path.travis.yml
File metadata and controls
52 lines (51 loc) · 1.51 KB
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
sudo: false
addons:
postgresql: "13"
language: python
python:
- "3.6"
- "3.7"
- "3.8"
- "3.9"
- "3.10"
env:
- DJANGO_VERSION="2.2" DB="postgres"
- DJANGO_VERSION="2.2" DB="mysql"
- DJANGO_VERSION="3.2" DB="postgres"
- DJANGO_VERSION="3.2" DB="mysql"
- DJANGO_VERSION="4.0" DB="postgres"
- DJANGO_VERSION="4.0" DB="mysql"
jobs:
exclude:
- python: "3.10"
env: DJANGO_VERSION="2.2" DB="postgres"
- python: "3.10"
env: DJANGO_VERSION="2.2" DB="mysql"
- python: "3.6"
env: DJANGO_VERSION="4.0" DB="postgres"
- python: "3.6"
env: DJANGO_VERSION="4.0" DB="mysql"
- python: "3.7"
env: DJANGO_VERSION="4.0" DB="postgres"
- python: "3.7"
env: DJANGO_VERSION="4.0" DB="mysql"
# command to install dependencies
install:
- pip install Django==$DJANGO_VERSION flake8 coverage
- pip install -e .[all]
# command to run tests
before_script:
- "[ \"$DB\" == 'postgres' ] && psql -c 'CREATE DATABASE lazysignup;' -U postgres"
- "[ \"$DB\" == 'mysql' ] && mysql -e 'CREATE DATABASE lazysignup;'"
script:
- flake8 .
- coverage run manage.py test --settings=lazysignup.tests.settings
- coverage report --fail-under=98
- "[ \"$DB\" == 'postgres' ] && psql -c 'DROP DATABASE IF EXISTS test_lazysignup;' -U postgres"
- "[ \"$DB\" == 'mysql' ] && mysql -e 'DROP DATABASE IF EXISTS test_lazysignup;'"
- coverage erase
- coverage run manage.py test --settings=custom_user_tests.settings
- coverage report --fail-under=98
branches:
except:
- 33-late-logins