File tree Expand file tree Collapse file tree 3 files changed +33
-4
lines changed Expand file tree Collapse file tree 3 files changed +33
-4
lines changed Original file line number Diff line number Diff line change @@ -38,6 +38,10 @@ matrix:
3838 env : TOXENV=py37-djmaster
3939 dist : xenial
4040 sudo : true
41+ - python : 3.6
42+ env : TOXENV=postgresql
43+ addons :
44+ postgresql : " 9.5"
4145 - env : TOXENV=flake8
4246 - env : TOXENV=isort
4347 - env : TOXENV=readme
Original file line number Diff line number Diff line change 8484 },
8585}
8686
87- DATABASES = {
88- 'default' : {
89- 'ENGINE' : 'django.db.backends.sqlite3' ,
87+ if os .environ .get ("DJANGO_DATABASE_ENGINE" ) == "postgresql" :
88+ DATABASES = {
89+ 'default' : {
90+ 'ENGINE' : 'django.db.backends.postgresql' ,
91+ 'NAME' : 'debug-toolbar' ,
92+ }
93+ }
94+ else :
95+ DATABASES = {
96+ 'default' : {
97+ 'ENGINE' : 'django.db.backends.sqlite3' ,
98+ }
9099 }
91- }
92100
93101
94102# Debug Toolbar configuration
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ envlist =
44 py{34,35,36,37}-dj20
55 py{35,36,37}-dj21
66 py{35,36,37}-djmaster
7+ postgresql,
78 flake8,
89 isort,
910 readme
@@ -25,6 +26,22 @@ whitelist_externals = make
2526pip_pre = True
2627commands = make coverage TEST_ARGS =' {posargs:tests}'
2728
29+ [testenv:postgresql]
30+ deps =
31+ Django>=2.1,<2.2
32+ coverage
33+ django_jinja
34+ html5lib
35+ psycopg2-binary
36+ selenium<4.0
37+ sqlparse
38+ setenv =
39+ PYTHONPATH = {toxinidir}
40+ DJANGO_DATABASE_ENGINE = postgresql
41+ whitelist_externals = make
42+ pip_pre = True
43+ commands = make coverage TEST_ARGS =' {posargs:tests}'
44+
2845[testenv:flake8]
2946basepython = python3
3047commands = make flake8
You can’t perform that action at this time.
0 commit comments