Added tox tests structure
This commit is contained in:
parent
37699fed8d
commit
03c929c571
|
@ -1,7 +1,9 @@
|
|||
.DS_Store
|
||||
.coverage
|
||||
.project
|
||||
.pydevproject
|
||||
.settings
|
||||
.tox
|
||||
*.pyc
|
||||
*.pyo
|
||||
.bzr
|
||||
|
|
25
.travis.yml
25
.travis.yml
|
@ -1,37 +1,20 @@
|
|||
language: python
|
||||
sudo: false
|
||||
python:
|
||||
- 2.7
|
||||
- 3.4
|
||||
- 3.5
|
||||
cache:
|
||||
directories:
|
||||
- $HOME/.cache/pip
|
||||
env:
|
||||
- DJANGO=django==1.8.14
|
||||
- DJANGO=django==1.8.14 DB_ENGINE="django.db.backends.postgresql_psycopg2" DB_NAME="test_project" DB_USER="postgres"
|
||||
- DJANGO=django==1.8.14 DB_ENGINE="django.db.backends.mysql" DB_NAME="test_project" DB_USER="travis"
|
||||
- DJANGO=django==1.9.9
|
||||
- DJANGO=django==1.9.9 DB_ENGINE="django.db.backends.postgresql" DB_NAME="test_project" DB_USER="postgres"
|
||||
- DJANGO=django==1.9.9 DB_ENGINE="django.db.backends.mysql" DB_NAME="test_project" DB_USER="travis"
|
||||
- DJANGO=django==1.10
|
||||
- DJANGO=django==1.10 DB_ENGINE="django.db.backends.postgresql" DB_NAME="test_project" DB_USER="postgres"
|
||||
- DJANGO=django==1.10 DB_ENGINE="django.db.backends.mysql" DB_NAME="test_project" DB_USER="travis"
|
||||
matrix:
|
||||
fast_finish: true
|
||||
services:
|
||||
- postgresql
|
||||
- mysql
|
||||
install:
|
||||
- travis_retry pip install $DJANGO
|
||||
- if [[ "$DB_ENGINE" == "django.db.backends.postgresql" ]] ; then travis_retry pip install psycopg2; fi
|
||||
- if [[ "$DB_ENGINE" == "django.db.backends.postgresql_psycopg2" ]] ; then travis_retry pip install psycopg2; fi
|
||||
- if [[ "$DB_ENGINE" == "django.db.backends.mysql" ]] ; then travis_retry pip install mysqlclient ; fi
|
||||
- travis_retry pip install -e .
|
||||
- pip install tox
|
||||
before_script:
|
||||
- if [[ "$DB_ENGINE" == "django.db.backends.mysql" ]] ; then mysql -e 'create database test_project'; fi
|
||||
- if [[ "$DB_ENGINE" == "django.db.backends.postgresql" ]] ; then psql -c 'create database test_project;' -U postgres; fi
|
||||
- if [[ "$DB_ENGINE" == "django.db.backends.postgresql_psycopg2" ]] ; then psql -c 'create database test_project;' -U postgres; fi
|
||||
script: python src/tests/runtests.py
|
||||
- mysql -e 'create database test_project'
|
||||
- psql -c 'create database test_project;' -U postgres
|
||||
script: tox
|
||||
notifications:
|
||||
email: false
|
||||
|
|
|
@ -3,7 +3,7 @@ django-watson
|
|||
|
||||
**django-watson** is a fast multi-model full-text search plugin for Django.
|
||||
|
||||
It is easy to install and use, and provides high quality search results.
|
||||
It is easy to install and use, and provides high quality search results.
|
||||
|
||||
|
||||
Features
|
||||
|
@ -13,6 +13,7 @@ Features
|
|||
* Order results by relevance.
|
||||
* No need to install additional third-party modules or services.
|
||||
* Fast and scaleable enough for most use cases.
|
||||
* Supports Django 1.8+, Python 2.7+.
|
||||
|
||||
|
||||
Documentation
|
||||
|
@ -35,7 +36,21 @@ You can keep up to date with the latest announcements by joining the
|
|||
[django-watson discussion group]: http://groups.google.com/group/django-watson
|
||||
"django-watson Google Group"
|
||||
|
||||
|
||||
|
||||
Contributing
|
||||
------------
|
||||
Bug reports, bug fixes, and new features are always welcome. Please raise issues on the
|
||||
[django-watson github repository](https://github.com/etianen/django-watson/issues), and submit
|
||||
pull requests for any new code.
|
||||
|
||||
You can run the test suite yourself from within a virtual environment with the following
|
||||
commands.
|
||||
|
||||
```
|
||||
pip install tox
|
||||
tox
|
||||
```
|
||||
|
||||
More information
|
||||
----------------
|
||||
|
||||
|
|
9
setup.py
9
setup.py
|
@ -1,10 +1,10 @@
|
|||
import os
|
||||
from distutils.core import setup
|
||||
|
||||
from watson import __version__
|
||||
|
||||
setup(
|
||||
name = "django-watson",
|
||||
version = "1.2.4",
|
||||
version = '.'.join(str(x) for x in __version__),
|
||||
description = "Full-text multi-table search application for Django. Easy to install and use, with good performance.",
|
||||
long_description = open(os.path.join(os.path.dirname(__file__), "README.markdown")).read(),
|
||||
author = "Dave Hall",
|
||||
|
@ -36,10 +36,9 @@ setup(
|
|||
"License :: OSI Approved :: BSD License",
|
||||
"Operating System :: OS Independent",
|
||||
"Programming Language :: Python",
|
||||
'Programming Language :: Python :: 2.6',
|
||||
'Programming Language :: Python :: 2.7',
|
||||
'Programming Language :: Python :: 3.2',
|
||||
'Programming Language :: Python :: 3.3',
|
||||
'Programming Language :: Python :: 3.4',
|
||||
'Programming Language :: Python :: 3.5',
|
||||
"Framework :: Django",
|
||||
],
|
||||
)
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
[tox]
|
||||
envlist =
|
||||
{py27,py34,py35}-django{18,19,110}-{sqlite,postgres,mysql}
|
||||
|
||||
[testenv]
|
||||
usedevelop = True
|
||||
deps =
|
||||
django18: Django>=1.8,<1.9
|
||||
django19: Django>=1.9,<1.10
|
||||
django110: Django>=1.10,<1.11
|
||||
coverage>=4.1
|
||||
postgres: psycopg2
|
||||
mysql: mysqlclient
|
||||
commands =
|
||||
sqlite: coverage run src/tests/runtests.py
|
||||
postgres: coverage run src/tests/runtests.py -d psql
|
||||
mysql: coverage run src/tests/runtests.py -d mysql
|
|
@ -0,0 +1,9 @@
|
|||
"""
|
||||
Multi-table search application for Django, using native database search engines.
|
||||
|
||||
Developed by Dave Hall.
|
||||
|
||||
<http://www.etianen.com/>
|
||||
"""
|
||||
|
||||
__version__ = VERSION = (1, 2, 4)
|
Loading…
Reference in New Issue