Skip to content
This repository has been archived by the owner on Jun 29, 2020. It is now read-only.

Commit

Permalink
Use MySQL on Travis CI
Browse files Browse the repository at this point in the history
  • Loading branch information
giginet committed Feb 11, 2017
1 parent 3faabcf commit 64d34a4
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ python:
before_install:
- ./utils/decrypt-files $password_for_secret_files
- git submodule update --init --recursive
- mv config/ci_settings.py src/kawaz/ci_settings.py
- mysql -uroot -e "create database test_kawaz_travis"
install:
- pip install tox
- pip install coverage coveralls
Expand Down
14 changes: 14 additions & 0 deletions config/ci_settings.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# テスト用データーベースの設定
DATABASES = {
'TEST': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'test_kawaz_travis',
'USER': 'root',
'PASSWORD': '',
'HOST': 'localhost',
'PORT': '',
'OPTIONS': {
'connect_timeout': 60,
},
}
}
1 change: 1 addition & 0 deletions src/kawaz/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,7 @@

# django-debug-toolbar
def show_debug_toolbar(request):
return False
from django.conf import settings
if settings.TESTING:
return False
Expand Down

0 comments on commit 64d34a4

Please sign in to comment.