Skip to content

Commit

Permalink
Trying to lose tox. It's been a right pain.
Browse files Browse the repository at this point in the history
  • Loading branch information
etianen committed Dec 21, 2017
1 parent 926cc2c commit aed855a
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 64 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,3 @@ MANIFEST
docs/_build
.coverage
*.sqlite3
.tox
47 changes: 31 additions & 16 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,54 @@
sudo: false
language: python
python:
- 3.6
- 3.6
- 3.5
- 2.7
addons:
apt:
packages:
- libmysqlclient-dev
cache:
directories:
- "$HOME/.cache/pip"
- libmysqlclient-dev
cache: pip
env:
global:
- PYTHONWARNINGS=default,ignore::PendingDeprecationWarning,ignore::ResourceWarning
- DJANGO_DATABASE_USER_POSTGRES=postgres
- DJANGO_DATABASE_USER_MYSQL=travis
- PYTHONWARNINGS=default,ignore::PendingDeprecationWarning,ignore::ResourceWarning
- DJANGO_DATABASE_USER_POSTGRES=postgres
- DJANGO_DATABASE_USER_MYSQL=travis
matrix:
- DJANGO='>=2.0,<2.1'
- DJANGO='>=1.11,<1.12'
- DJANGO='>=1.10,<1.11'
- DJANGO='>=1.9,<1.10'
- DJANGO='>=1.8,<1.9'
matrix:
fast_finish: true
exclude:
- python: 2.7
env: DJANGO='>=2.0,<2.1'
services:
- postgresql
- mysql
- postgresql
- mysql
install:
- pyenv shell 2.7 3.5 3.6
- pip install 'tox>=2.3.1'
- pip install flake8 coverage mock sphinx django$DJANGO psycopg2 mysqlclient -e .
before_script:
- mysql -e 'create database test_project'
- psql -c 'create database test_project;' -U postgres;
script: tox
- mysql -e 'create database test_project'
- psql -c 'create database test_project;' -U postgres;
script:
- flake8
- coverage run tests/manage.py test tests
- (cd docs && sphinx-build -n -W . _build)
after_success:
- coverage report
deploy:
provider: pypi
distributions: sdist bdist_wheel
user: etianen
password:
secure: XW4/9HiChbPJSJe4d/MRcO+ViPGhW1iQ8kVi814KJh7mCxOAKijpW5hfdc9oSKB6d8iYB3OzZ7naIUU9GMce40bpeTgPDLVBLCSYKRNLuVoJdh+Q6ItGUiFf8kAJz5jgopG80QnCpLA9JvYxKVJ4amfYWWm204eQmIEnRRAd+Jk=
on:
tags: true
distributions: sdist bdist_wheel
condition: $DJANGO='>=2.0,<2.1'
python: 3.6
repo: etianen/django-reversion
notifications:
email: false
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ commands. The test suite requires that both MySQL and PostgreSQL be installed.

.. code:: bash
pip install 'tox>=2.3.1'
tox
pip install psycopg2 mysqlclient -e .
tests/manage.py test tests
The django-reversion project is built on every push with `Travis CI <https://travis-ci.org/etianen/django-reversion>`_.

Expand Down
4 changes: 4 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
[bdist_wheel]
universal = 1

[flake8]
max-line-length=120
exclude=venv,migrations,.tox
2 changes: 1 addition & 1 deletion tests/test_app/tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def testCreateRevisionException(self):
with reversion.create_revision():
TestModel.objects.create()
raise Exception("Boom!")
except Exception as ex:
except Exception:
pass
self.assertNoRevision()

Expand Down
44 changes: 0 additions & 44 deletions tox.ini

This file was deleted.

0 comments on commit aed855a

Please sign in to comment.