-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from LegoStormtroopr/master
1.6 update
- Loading branch information
Showing
6 changed files
with
100 additions
and
60 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
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,20 +1,32 @@ | ||
# Lets run on the new infrastructure | ||
sudo: false | ||
|
||
language: python | ||
python: | ||
- "2.7" | ||
- "3.5" | ||
|
||
services: | ||
- postgresql | ||
|
||
env: | ||
- DJANGO=1.8 | ||
- DJANGO=1.10 | ||
- DJANGO_VERSION=1.8 DB=postgres ARISTOTLE_VERSION=1.6 | ||
- DJANGO_VERSION=1.10 DB=postgres ARISTOTLE_VERSION=1.6 | ||
- DJANGO_VERSION=1.10 DB=postgres ARISTOTLE_VERSION=develop | ||
|
||
before_script: | ||
# We only test elasticsearch, and a small setup time is recommended | ||
- sleep 10; | ||
- psql -c 'create database aristotle_test_db;' -U postgres | ||
|
||
install: | ||
- "pip install -r requirements.txt" | ||
- "pip install -r requirements.test.txt" | ||
- "pip install ." | ||
- pip install -q Django==$DJANGO | ||
- pip install tox | ||
|
||
# command to run tests | ||
script: | ||
- coverage run --branch --source=aristotle_glossary manage.py test | ||
- tox -e dj$DJANGO_VERSION-test-db-$DB-search-whoosh-aristotle$ARISTOTLE_VERSION --skip-missing-interpreters --workdir /tmp/tox | ||
after_success: | ||
- coveralls | ||
|
||
matrix: | ||
allow_failures: | ||
- env: DJ=1.10 DB=postgres ARISTOTLE_VERSION=develop |
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,56 +1,13 @@ | ||
import os, sys | ||
from aristotle_mdr.required_settings import * | ||
from aristotle_glossary.settings import * | ||
BASE = os.path.dirname(os.path.dirname(__file__)) | ||
|
||
sys.path.insert(1,BASE) | ||
sys.path.insert(1,os.path.join(BASE, "tests")) | ||
|
||
SECRET_KEY = 'inara+vtkprm7@0(fsc$+grbz9-s+tmo9d)e#k(9uf8m281&$7xhdkjr' | ||
SOUTH_TESTS_MIGRATE = True | ||
|
||
MEDIA_ROOT = os.path.join(BASE, "media") | ||
|
||
MEDIA_URL = '/media/' | ||
CKEDITOR_UPLOAD_PATH = 'uploads/' | ||
|
||
DATABASES = { | ||
'default': { | ||
'ENGINE': 'django.db.backends.sqlite3', | ||
'NAME': ':memory:', | ||
} | ||
} | ||
|
||
class DisableMigrations(object): | ||
|
||
def __contains__(self, item): | ||
return True | ||
|
||
def __getitem__(self, item): | ||
return "notmigrations" | ||
|
||
MIGRATION_MODULES = DisableMigrations() | ||
from aristotle_mdr.tests.settings.settings import * | ||
from aristotle_mdr.required_settings import INSTALLED_APPS | ||
|
||
INSTALLED_APPS = ( | ||
#The good stuff | ||
# The good stuff | ||
'aristotle_glossary', | ||
) + INSTALLED_APPS | ||
|
||
HAYSTACK_CONNECTIONS = { | ||
'default': { | ||
'ENGINE': 'haystack.backends.whoosh_backend.WhooshEngine', | ||
'PATH': os.path.join(BASE, 'aristotle_mdr/tests/whoosh_index'), | ||
'INCLUDE_SPELLING':True, | ||
}, | ||
} | ||
|
||
# https://docs.djangoproject.com/en/1.6/topics/testing/overview/#speeding-up-the-tests | ||
# We do a lot of user log in testing, this should speed stuff up. | ||
PASSWORD_HASHERS = ( | ||
'django.contrib.auth.hashers.MD5PasswordHasher', | ||
) | ||
|
||
ARISTOTLE_SETTINGS['SEPARATORS']['DataElementConcept'] = '--' | ||
ARISTOTLE_SETTINGS['CONTENT_EXTENSIONS'] = ARISTOTLE_SETTINGS['CONTENT_EXTENSIONS'] +['aristotle_glossary'] | ||
|
||
ROOT_URLCONF = 'aristotle_glossary.tests.urls' | ||
ROOT_URLCONF = 'aristotle_glossary.tests.urls' |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
[tox] | ||
skipsdist = True | ||
envlist = | ||
dj{1.8,1.10,1.11}-{test,manage}-db-{postgres,sqlite}-search-{elastic,whoosh}-aristotle{1.6,develop} | ||
dj18-ally | ||
docs | ||
pep8 | ||
; isort | ||
|
||
[testenv] | ||
passenv = | ||
test: DB | ||
test: SEARCH | ||
test: VARIANT | ||
test: DJANGO_VERSION | ||
test: TRAVIS | ||
|
||
setenv = | ||
PYTHONPATH = {toxinidir}:{toxinidir} | ||
TOXDIR = {envdir} | ||
manage: aristotlemdr__BASE_DIR = {envdir} | ||
test: aristotlemdr__BASE_DIR = {envdir} | ||
|
||
skipmigrate: ARISTOTLE_DEV_SKIP_MIGRATIONS=1 | ||
|
||
ally: ARISTOTLE_DEV_SKIP_MIGRATIONS = 1 | ||
search-elastic: SEARCH=elastic | ||
search-whoosh: SEARCH=whoosh | ||
db-sqlite: DB=sqlite | ||
db-postgres: DB=postgres | ||
|
||
deps = | ||
; six | ||
pip>8.1.1 | ||
setuptools>34.0 | ||
|
||
aristotle-1.6: aristotle-metadata-registry>=1.6.2,<1.7 | ||
aristotle-develop: git+git://github.com/aristotle-mdr/aristotle-metadata-registry@develop#egg=aristotle-metadata-registry | ||
|
||
-r{toxinidir}/requirements.txt | ||
django_tools | ||
coverage | ||
dj-database-url | ||
|
||
dj1.8: Django>=1.8,<1.9 | ||
dj1.10: Django>=1.10,<1.11 | ||
|
||
db-postgres: psycopg2 | ||
db-mariadb: mysqlclient | ||
|
||
search-elastic: elasticsearch>=2.0.0,<3.0.0 | ||
search-elastic: django-haystack-elasticsearch | ||
search-whoosh: Whoosh | ||
|
||
ally: Whoosh | ||
ally: Django>=1.10,<1.11 | ||
ally: wcag_zoo | ||
|
||
commands = | ||
pip list ; Tell us exactly what is being run | ||
test: coverage run --branch --source=aristotle_glossary manage.py test aristotle_glossary.tests --settings=aristotle_glossary.tests.settings | ||
manage: ./manage.py {posargs} | ||
|
||
ally: coverage run --branch --source=aristotle_glossary ./manage.py test aristotle_glossary.tests.accessibility --settings=aristotle_glossary.tests.settings | ||
|
||
[testenv:pep8] | ||
deps = | ||
flake8 | ||
commands= | ||
flake8 --exclude=migrations,tests --ignore=E501,E225,E123 {toxinidir}/aristotle_glossary |