-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Travis tests + MySQL initial migration fix (#31)
* Try to grab a DATABASE_URL during tests Requires the django-environ package. We can default to using an in-memory sqlite database (as it was before) if no DATABASE_URL is specified in the environment. * Make test_log_time_fast() less flaky On one Travis job, it took 11ms to respond and this test failed * Start testing migrations with Postgres/MySQL Adapted from django-guardian's approach Also, pin test dependencies less rigidly * Remove db_index=True from query_params field Should fix MySQL migrations
- Loading branch information
Showing
7 changed files
with
186 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,78 +1,172 @@ | ||
sudo: false | ||
language: python | ||
|
||
python: | ||
- "3.5" | ||
|
||
cache: pip | ||
|
||
sudo: false | ||
|
||
env: | ||
- TOX_ENV=py27-flake8 | ||
- TOX_ENV=py27-docs | ||
- TOX_ENV=py27-django1.7-drf3.0 | ||
- TOX_ENV=py33-django1.7-drf3.0 | ||
- TOX_ENV=py34-django1.7-drf3.0 | ||
- TOX_ENV=py27-django1.7-drf3.1 | ||
- TOX_ENV=py33-django1.7-drf3.1 | ||
- TOX_ENV=py34-django1.7-drf3.1 | ||
- TOX_ENV=py27-django1.7-drf3.2 | ||
- TOX_ENV=py33-django1.7-drf3.2 | ||
- TOX_ENV=py34-django1.7-drf3.2 | ||
- TOX_ENV=py27-django1.7-drf3.3 | ||
- TOX_ENV=py33-django1.7-drf3.3 | ||
- TOX_ENV=py34-django1.7-drf3.3 | ||
- TOX_ENV=py27-django1.8-drf3.0 | ||
- TOX_ENV=py33-django1.8-drf3.0 | ||
- TOX_ENV=py34-django1.8-drf3.0 | ||
- TOX_ENV=py35-django1.8-drf3.0 | ||
- TOX_ENV=py27-django1.8-drf3.1 | ||
- TOX_ENV=py33-django1.8-drf3.1 | ||
- TOX_ENV=py34-django1.8-drf3.1 | ||
- TOX_ENV=py35-django1.8-drf3.1 | ||
- TOX_ENV=py27-django1.8-drf3.2 | ||
- TOX_ENV=py33-django1.8-drf3.2 | ||
- TOX_ENV=py34-django1.8-drf3.2 | ||
- TOX_ENV=py35-django1.8-drf3.2 | ||
- TOX_ENV=py27-django1.8-drf3.3 | ||
- TOX_ENV=py33-django1.8-drf3.3 | ||
- TOX_ENV=py34-django1.8-drf3.3 | ||
- TOX_ENV=py35-django1.8-drf3.3 | ||
- TOX_ENV=py27-django1.8-drf3.4 | ||
- TOX_ENV=py33-django1.8-drf3.4 | ||
- TOX_ENV=py34-django1.8-drf3.4 | ||
- TOX_ENV=py35-django1.8-drf3.4 | ||
- TOX_ENV=py27-django1.8-drf3.5 | ||
- TOX_ENV=py33-django1.8-drf3.5 | ||
- TOX_ENV=py34-django1.8-drf3.5 | ||
- TOX_ENV=py35-django1.8-drf3.5 | ||
- TOX_ENV=py27-django1.9-drf3.3 | ||
- TOX_ENV=py34-django1.9-drf3.3 | ||
- TOX_ENV=py35-django1.9-drf3.3 | ||
- TOX_ENV=py27-django1.9-drf3.4 | ||
- TOX_ENV=py34-django1.9-drf3.4 | ||
- TOX_ENV=py35-django1.9-drf3.4 | ||
- TOX_ENV=py27-django1.9-drf3.5 | ||
- TOX_ENV=py34-django1.9-drf3.5 | ||
- TOX_ENV=py35-django1.9-drf3.5 | ||
- TOX_ENV=py27-django1.10-drf3.4 | ||
- TOX_ENV=py34-django1.10-drf3.4 | ||
- TOX_ENV=py35-django1.10-drf3.4 | ||
- TOX_ENV=py27-django1.10-drf3.5 | ||
- TOX_ENV=py34-django1.10-drf3.5 | ||
- TOX_ENV=py35-django1.10-drf3.5 | ||
|
||
- TOX_ENV=py27-flake8 | ||
- TOX_ENV=py27-docs | ||
- TOX_ENV=py27-django1.7-drf3.0 DATABASE_URL=sqlite:// | ||
- TOX_ENV=py27-django1.7-drf3.0 DATABASE_URL=mysql://root:@localhost/test_db | ||
- TOX_ENV=py27-django1.7-drf3.0 DATABASE_URL=postgres://postgres@/test_db | ||
- TOX_ENV=py33-django1.7-drf3.0 DATABASE_URL=sqlite:// | ||
- TOX_ENV=py33-django1.7-drf3.0 DATABASE_URL=mysql://root:@localhost/test_db | ||
- TOX_ENV=py33-django1.7-drf3.0 DATABASE_URL=postgres://postgres@/test_db | ||
- TOX_ENV=py34-django1.7-drf3.0 DATABASE_URL=sqlite:// | ||
- TOX_ENV=py34-django1.7-drf3.0 DATABASE_URL=mysql://root:@localhost/test_db | ||
- TOX_ENV=py34-django1.7-drf3.0 DATABASE_URL=postgres://postgres@/test_db | ||
- TOX_ENV=py27-django1.7-drf3.1 DATABASE_URL=sqlite:// | ||
- TOX_ENV=py27-django1.7-drf3.1 DATABASE_URL=mysql://root:@localhost/test_db | ||
- TOX_ENV=py27-django1.7-drf3.1 DATABASE_URL=postgres://postgres@/test_db | ||
- TOX_ENV=py33-django1.7-drf3.1 DATABASE_URL=sqlite:// | ||
- TOX_ENV=py33-django1.7-drf3.1 DATABASE_URL=mysql://root:@localhost/test_db | ||
- TOX_ENV=py33-django1.7-drf3.1 DATABASE_URL=postgres://postgres@/test_db | ||
- TOX_ENV=py34-django1.7-drf3.1 DATABASE_URL=sqlite:// | ||
- TOX_ENV=py34-django1.7-drf3.1 DATABASE_URL=mysql://root:@localhost/test_db | ||
- TOX_ENV=py34-django1.7-drf3.1 DATABASE_URL=postgres://postgres@/test_db | ||
- TOX_ENV=py27-django1.7-drf3.2 DATABASE_URL=sqlite:// | ||
- TOX_ENV=py27-django1.7-drf3.2 DATABASE_URL=mysql://root:@localhost/test_db | ||
- TOX_ENV=py27-django1.7-drf3.2 DATABASE_URL=postgres://postgres@/test_db | ||
- TOX_ENV=py33-django1.7-drf3.2 DATABASE_URL=sqlite:// | ||
- TOX_ENV=py33-django1.7-drf3.2 DATABASE_URL=mysql://root:@localhost/test_db | ||
- TOX_ENV=py33-django1.7-drf3.2 DATABASE_URL=postgres://postgres@/test_db | ||
- TOX_ENV=py34-django1.7-drf3.2 DATABASE_URL=sqlite:// | ||
- TOX_ENV=py34-django1.7-drf3.2 DATABASE_URL=mysql://root:@localhost/test_db | ||
- TOX_ENV=py34-django1.7-drf3.2 DATABASE_URL=postgres://postgres@/test_db | ||
- TOX_ENV=py27-django1.7-drf3.3 DATABASE_URL=sqlite:// | ||
- TOX_ENV=py27-django1.7-drf3.3 DATABASE_URL=mysql://root:@localhost/test_db | ||
- TOX_ENV=py27-django1.7-drf3.3 DATABASE_URL=postgres://postgres@/test_db | ||
- TOX_ENV=py33-django1.7-drf3.3 DATABASE_URL=sqlite:// | ||
- TOX_ENV=py33-django1.7-drf3.3 DATABASE_URL=mysql://root:@localhost/test_db | ||
- TOX_ENV=py33-django1.7-drf3.3 DATABASE_URL=postgres://postgres@/test_db | ||
- TOX_ENV=py34-django1.7-drf3.3 DATABASE_URL=sqlite:// | ||
- TOX_ENV=py34-django1.7-drf3.3 DATABASE_URL=mysql://root:@localhost/test_db | ||
- TOX_ENV=py34-django1.7-drf3.3 DATABASE_URL=postgres://postgres@/test_db | ||
- TOX_ENV=py27-django1.8-drf3.0 DATABASE_URL=sqlite:// | ||
- TOX_ENV=py27-django1.8-drf3.0 DATABASE_URL=mysql://root:@localhost/test_db | ||
- TOX_ENV=py27-django1.8-drf3.0 DATABASE_URL=postgres://postgres@/test_db | ||
- TOX_ENV=py33-django1.8-drf3.0 DATABASE_URL=sqlite:// | ||
- TOX_ENV=py33-django1.8-drf3.0 DATABASE_URL=mysql://root:@localhost/test_db | ||
- TOX_ENV=py33-django1.8-drf3.0 DATABASE_URL=postgres://postgres@/test_db | ||
- TOX_ENV=py34-django1.8-drf3.0 DATABASE_URL=sqlite:// | ||
- TOX_ENV=py34-django1.8-drf3.0 DATABASE_URL=mysql://root:@localhost/test_db | ||
- TOX_ENV=py34-django1.8-drf3.0 DATABASE_URL=postgres://postgres@/test_db | ||
- TOX_ENV=py35-django1.8-drf3.0 DATABASE_URL=sqlite:// | ||
- TOX_ENV=py35-django1.8-drf3.0 DATABASE_URL=mysql://root:@localhost/test_db | ||
- TOX_ENV=py35-django1.8-drf3.0 DATABASE_URL=postgres://postgres@/test_db | ||
- TOX_ENV=py27-django1.8-drf3.1 DATABASE_URL=sqlite:// | ||
- TOX_ENV=py27-django1.8-drf3.1 DATABASE_URL=mysql://root:@localhost/test_db | ||
- TOX_ENV=py27-django1.8-drf3.1 DATABASE_URL=postgres://postgres@/test_db | ||
- TOX_ENV=py33-django1.8-drf3.1 DATABASE_URL=sqlite:// | ||
- TOX_ENV=py33-django1.8-drf3.1 DATABASE_URL=mysql://root:@localhost/test_db | ||
- TOX_ENV=py33-django1.8-drf3.1 DATABASE_URL=postgres://postgres@/test_db | ||
- TOX_ENV=py34-django1.8-drf3.1 DATABASE_URL=sqlite:// | ||
- TOX_ENV=py34-django1.8-drf3.1 DATABASE_URL=mysql://root:@localhost/test_db | ||
- TOX_ENV=py34-django1.8-drf3.1 DATABASE_URL=postgres://postgres@/test_db | ||
- TOX_ENV=py35-django1.8-drf3.1 DATABASE_URL=sqlite:// | ||
- TOX_ENV=py35-django1.8-drf3.1 DATABASE_URL=mysql://root:@localhost/test_db | ||
- TOX_ENV=py35-django1.8-drf3.1 DATABASE_URL=postgres://postgres@/test_db | ||
- TOX_ENV=py27-django1.8-drf3.2 DATABASE_URL=sqlite:// | ||
- TOX_ENV=py27-django1.8-drf3.2 DATABASE_URL=mysql://root:@localhost/test_db | ||
- TOX_ENV=py27-django1.8-drf3.2 DATABASE_URL=postgres://postgres@/test_db | ||
- TOX_ENV=py33-django1.8-drf3.2 DATABASE_URL=sqlite:// | ||
- TOX_ENV=py33-django1.8-drf3.2 DATABASE_URL=mysql://root:@localhost/test_db | ||
- TOX_ENV=py33-django1.8-drf3.2 DATABASE_URL=postgres://postgres@/test_db | ||
- TOX_ENV=py34-django1.8-drf3.2 DATABASE_URL=sqlite:// | ||
- TOX_ENV=py34-django1.8-drf3.2 DATABASE_URL=mysql://root:@localhost/test_db | ||
- TOX_ENV=py34-django1.8-drf3.2 DATABASE_URL=postgres://postgres@/test_db | ||
- TOX_ENV=py35-django1.8-drf3.2 DATABASE_URL=sqlite:// | ||
- TOX_ENV=py35-django1.8-drf3.2 DATABASE_URL=mysql://root:@localhost/test_db | ||
- TOX_ENV=py35-django1.8-drf3.2 DATABASE_URL=postgres://postgres@/test_db | ||
- TOX_ENV=py27-django1.8-drf3.3 DATABASE_URL=sqlite:// | ||
- TOX_ENV=py27-django1.8-drf3.3 DATABASE_URL=mysql://root:@localhost/test_db | ||
- TOX_ENV=py27-django1.8-drf3.3 DATABASE_URL=postgres://postgres@/test_db | ||
- TOX_ENV=py33-django1.8-drf3.3 DATABASE_URL=sqlite:// | ||
- TOX_ENV=py33-django1.8-drf3.3 DATABASE_URL=mysql://root:@localhost/test_db | ||
- TOX_ENV=py33-django1.8-drf3.3 DATABASE_URL=postgres://postgres@/test_db | ||
- TOX_ENV=py34-django1.8-drf3.3 DATABASE_URL=sqlite:// | ||
- TOX_ENV=py34-django1.8-drf3.3 DATABASE_URL=mysql://root:@localhost/test_db | ||
- TOX_ENV=py34-django1.8-drf3.3 DATABASE_URL=postgres://postgres@/test_db | ||
- TOX_ENV=py35-django1.8-drf3.3 DATABASE_URL=sqlite:// | ||
- TOX_ENV=py35-django1.8-drf3.3 DATABASE_URL=mysql://root:@localhost/test_db | ||
- TOX_ENV=py35-django1.8-drf3.3 DATABASE_URL=postgres://postgres@/test_db | ||
- TOX_ENV=py27-django1.8-drf3.4 DATABASE_URL=sqlite:// | ||
- TOX_ENV=py27-django1.8-drf3.4 DATABASE_URL=mysql://root:@localhost/test_db | ||
- TOX_ENV=py27-django1.8-drf3.4 DATABASE_URL=postgres://postgres@/test_db | ||
- TOX_ENV=py33-django1.8-drf3.4 DATABASE_URL=sqlite:// | ||
- TOX_ENV=py33-django1.8-drf3.4 DATABASE_URL=mysql://root:@localhost/test_db | ||
- TOX_ENV=py33-django1.8-drf3.4 DATABASE_URL=postgres://postgres@/test_db | ||
- TOX_ENV=py34-django1.8-drf3.4 DATABASE_URL=sqlite:// | ||
- TOX_ENV=py34-django1.8-drf3.4 DATABASE_URL=mysql://root:@localhost/test_db | ||
- TOX_ENV=py34-django1.8-drf3.4 DATABASE_URL=postgres://postgres@/test_db | ||
- TOX_ENV=py35-django1.8-drf3.4 DATABASE_URL=sqlite:// | ||
- TOX_ENV=py35-django1.8-drf3.4 DATABASE_URL=mysql://root:@localhost/test_db | ||
- TOX_ENV=py35-django1.8-drf3.4 DATABASE_URL=postgres://postgres@/test_db | ||
- TOX_ENV=py27-django1.8-drf3.5 DATABASE_URL=sqlite:// | ||
- TOX_ENV=py27-django1.8-drf3.5 DATABASE_URL=mysql://root:@localhost/test_db | ||
- TOX_ENV=py27-django1.8-drf3.5 DATABASE_URL=postgres://postgres@/test_db | ||
- TOX_ENV=py33-django1.8-drf3.5 DATABASE_URL=sqlite:// | ||
- TOX_ENV=py33-django1.8-drf3.5 DATABASE_URL=mysql://root:@localhost/test_db | ||
- TOX_ENV=py33-django1.8-drf3.5 DATABASE_URL=postgres://postgres@/test_db | ||
- TOX_ENV=py34-django1.8-drf3.5 DATABASE_URL=sqlite:// | ||
- TOX_ENV=py34-django1.8-drf3.5 DATABASE_URL=mysql://root:@localhost/test_db | ||
- TOX_ENV=py34-django1.8-drf3.5 DATABASE_URL=postgres://postgres@/test_db | ||
- TOX_ENV=py35-django1.8-drf3.5 DATABASE_URL=sqlite:// | ||
- TOX_ENV=py35-django1.8-drf3.5 DATABASE_URL=mysql://root:@localhost/test_db | ||
- TOX_ENV=py35-django1.8-drf3.5 DATABASE_URL=postgres://postgres@/test_db | ||
- TOX_ENV=py27-django1.9-drf3.3 DATABASE_URL=sqlite:// | ||
- TOX_ENV=py27-django1.9-drf3.3 DATABASE_URL=mysql://root:@localhost/test_db | ||
- TOX_ENV=py27-django1.9-drf3.3 DATABASE_URL=postgres://postgres@/test_db | ||
- TOX_ENV=py34-django1.9-drf3.3 DATABASE_URL=sqlite:// | ||
- TOX_ENV=py34-django1.9-drf3.3 DATABASE_URL=mysql://root:@localhost/test_db | ||
- TOX_ENV=py34-django1.9-drf3.3 DATABASE_URL=postgres://postgres@/test_db | ||
- TOX_ENV=py35-django1.9-drf3.3 DATABASE_URL=sqlite:// | ||
- TOX_ENV=py35-django1.9-drf3.3 DATABASE_URL=mysql://root:@localhost/test_db | ||
- TOX_ENV=py35-django1.9-drf3.3 DATABASE_URL=postgres://postgres@/test_db | ||
- TOX_ENV=py27-django1.9-drf3.4 DATABASE_URL=sqlite:// | ||
- TOX_ENV=py27-django1.9-drf3.4 DATABASE_URL=mysql://root:@localhost/test_db | ||
- TOX_ENV=py27-django1.9-drf3.4 DATABASE_URL=postgres://postgres@/test_db | ||
- TOX_ENV=py34-django1.9-drf3.4 DATABASE_URL=sqlite:// | ||
- TOX_ENV=py34-django1.9-drf3.4 DATABASE_URL=mysql://root:@localhost/test_db | ||
- TOX_ENV=py34-django1.9-drf3.4 DATABASE_URL=postgres://postgres@/test_db | ||
- TOX_ENV=py35-django1.9-drf3.4 DATABASE_URL=sqlite:// | ||
- TOX_ENV=py35-django1.9-drf3.4 DATABASE_URL=mysql://root:@localhost/test_db | ||
- TOX_ENV=py35-django1.9-drf3.4 DATABASE_URL=postgres://postgres@/test_db | ||
- TOX_ENV=py27-django1.9-drf3.5 DATABASE_URL=sqlite:// | ||
- TOX_ENV=py27-django1.9-drf3.5 DATABASE_URL=mysql://root:@localhost/test_db | ||
- TOX_ENV=py27-django1.9-drf3.5 DATABASE_URL=postgres://postgres@/test_db | ||
- TOX_ENV=py34-django1.9-drf3.5 DATABASE_URL=sqlite:// | ||
- TOX_ENV=py34-django1.9-drf3.5 DATABASE_URL=mysql://root:@localhost/test_db | ||
- TOX_ENV=py34-django1.9-drf3.5 DATABASE_URL=postgres://postgres@/test_db | ||
- TOX_ENV=py35-django1.9-drf3.5 DATABASE_URL=sqlite:// | ||
- TOX_ENV=py35-django1.9-drf3.5 DATABASE_URL=mysql://root:@localhost/test_db | ||
- TOX_ENV=py35-django1.9-drf3.5 DATABASE_URL=postgres://postgres@/test_db | ||
- TOX_ENV=py27-django1.10-drf3.4 DATABASE_URL=sqlite:// | ||
- TOX_ENV=py27-django1.10-drf3.4 DATABASE_URL=mysql://root:@localhost/test_db | ||
- TOX_ENV=py27-django1.10-drf3.4 DATABASE_URL=postgres://postgres@/test_db | ||
- TOX_ENV=py34-django1.10-drf3.4 DATABASE_URL=sqlite:// | ||
- TOX_ENV=py34-django1.10-drf3.4 DATABASE_URL=mysql://root:@localhost/test_db | ||
- TOX_ENV=py34-django1.10-drf3.4 DATABASE_URL=postgres://postgres@/test_db | ||
- TOX_ENV=py35-django1.10-drf3.4 DATABASE_URL=sqlite:// | ||
- TOX_ENV=py35-django1.10-drf3.4 DATABASE_URL=mysql://root:@localhost/test_db | ||
- TOX_ENV=py35-django1.10-drf3.4 DATABASE_URL=postgres://postgres@/test_db | ||
- TOX_ENV=py27-django1.10-drf3.5 DATABASE_URL=sqlite:// | ||
- TOX_ENV=py27-django1.10-drf3.5 DATABASE_URL=mysql://root:@localhost/test_db | ||
- TOX_ENV=py27-django1.10-drf3.5 DATABASE_URL=postgres://postgres@/test_db | ||
- TOX_ENV=py34-django1.10-drf3.5 DATABASE_URL=sqlite:// | ||
- TOX_ENV=py34-django1.10-drf3.5 DATABASE_URL=mysql://root:@localhost/test_db | ||
- TOX_ENV=py34-django1.10-drf3.5 DATABASE_URL=postgres://postgres@/test_db | ||
- TOX_ENV=py35-django1.10-drf3.5 DATABASE_URL=sqlite:// | ||
- TOX_ENV=py35-django1.10-drf3.5 DATABASE_URL=mysql://root:@localhost/test_db | ||
- TOX_ENV=py35-django1.10-drf3.5 DATABASE_URL=postgres://postgres@/test_db | ||
matrix: | ||
fast_finish: true | ||
|
||
install: | ||
- pip install -r requirements.txt | ||
- pip install tox python-coveralls | ||
|
||
- pip install tox python-coveralls psycopg2 mysqlclient | ||
script: | ||
- tox -e $TOX_ENV | ||
- coverage run runtests.py | ||
|
||
- tox -e $TOX_ENV | ||
- coverage run runtests.py | ||
after_success: | ||
coveralls | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters