Skip to content
Snippets Groups Projects
Commit aceaef4a authored by Bastien Abadie's avatar Bastien Abadie
Browse files

Split test/build requirements

parent b9e59a30
No related branches found
No related tags found
No related merge requests found
......@@ -4,3 +4,4 @@ playbook.retry
*.egg-info
build
dist
.eggs
......@@ -19,10 +19,9 @@ backend-tests:
DB_PORT: 5432
before_script:
- apk update
- apk add postgresql-dev libjpeg-turbo-dev gcc musl-dev
- pip install -r requirements.txt
- apk --update add postgresql-dev libjpeg-turbo-dev gcc musl-dev
script:
- python setup.py test
- pip install .[test]
- flake8
- cd arkindex && ./manage.py test
#This file exists to allow python setup.py test to work.
import os, sys
os.environ['DJANGO_SETTINGS_MODULE'] = 'arkindex.project.settings'
test_dir = os.path.dirname(__file__)
sys.path.insert(0, test_dir)
from django.test.utils import get_runner
from django.conf import settings
def run():
# Setup django
import django
django.setup()
# Run tests on documents
TestRunner = get_runner(settings)
test_runner = TestRunner(verbosity=2, interactive=True)
failures = test_runner.run_tests(['arkindex.documents.tests'])
sys.exit(failures)
if __name__ == '__main__':
run()
......@@ -6,19 +6,14 @@ django-webpack-loader==0.5.0
djangorestframework==3.7.1
elasticsearch==5.4.0
et-xmlfile==1.0.1
flake8==3.5.0
idna==2.6
ijson==2.3
jdcal==1.3
mccabe==0.6.1
olefile==0.44
openpyxl==2.4.9
Pillow==4.3.0
psycopg2==2.7.3.2
pycodestyle==2.3.1
pyflakes==1.6.0
pytz==2017.2
requests==2.18.4
roman==2.0.0
tripoli==2.0.0
urllib3==1.22
......@@ -7,6 +7,9 @@ with open('VERSION') as f:
with open('requirements.txt') as f:
requirements = f.read().splitlines()
with open('tests-requirements.txt') as f:
tests_requirements = f.read().splitlines()
setup(
name='arkindex',
version=VERSION,
......@@ -15,7 +18,13 @@ setup(
author_email='abadie@teklia.com',
url='https://arkindex.teklia.com',
install_requires=requirements,
test_suite='arkindex.project.runtests.run',
tests_require=tests_requirements,
extras_require={
'test': tests_requirements,
},
packages=find_packages(),
py_modules=['arkindex',],
scripts=[
'arkindex/manage.py',
],
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment