From 154aa2095060fb45d09d9927662e0b26849c0588 Mon Sep 17 00:00:00 2001 From: Johann Schmitz Date: Sat, 30 Jan 2016 07:48:05 +0100 Subject: [PATCH] Updated Makefile, added .travis.yml --- .gitignore | 1 + .travis.yml | 39 +++++++++++++++++++++++++++++++++++++++ Makefile | 27 ++++++++++++++++++++++++--- src/manage.py | 0 4 files changed, 64 insertions(+), 3 deletions(-) create mode 100644 .travis.yml mode change 100644 => 100755 src/manage.py diff --git a/.gitignore b/.gitignore index c30b56e..d2c5f05 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ .idea/ *.pyc +*.pyo __pycache__ src/gitbrowser/settings/dev.py diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..2f20599 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,39 @@ +language: python +sudo: False +python: +- 2.7 +- 3.3 +- 3.4 +- 3.5 +- pypy +- nightly # 3.6 +env: + matrix: + - DJANGO="1.7" + - DJANGO="1.8" + - DJANGO="1.9" + +install: +- pip install -r requirements.txt +- pip install -r requirements_dev.txt +- pip install "django==$DJANGO" + +#Django version Python versions +#1.8 2.7, 3.2 (until the end of 2016), 3.3, 3.4, 3.5 +#1.9, 1.10 2.7, 3.4, 3.5 +matrix: + exclude: + # Django 1.9+ no longer supports python 3.2/3.3 + - python: 3.3 + env: DJANGO="1.9" + + # django 1.7 isn't supported on python > 3.4 + - python: 3.5 + env: DJANGO="1.7" + - python: nightly + env: DJANGO="1.7" + +script: make travis + +after_success: +- coveralls diff --git a/Makefile b/Makefile index d1a2a42..4e55c45 100644 --- a/Makefile +++ b/Makefile @@ -1,11 +1,32 @@ TARGET?=tests -test: +test_default_python: @python --version - DJANGO_SETTINGS_MODULE=tests.settings PYTHONPATH=".:src" django-admin.py test ${TARGET} -v2 + DJANGO_SETTINGS_MODULE=tests.settings PYTHONPATH=".:src" src/manage.py test -v2 + +test_py2: + @python --version + DJANGO_SETTINGS_MODULE=tests.settings PYTHONPATH=".:src" python2 src/manage.py test -v2 + +test_py3: + @python --version + DJANGO_SETTINGS_MODULE=tests.settings PYTHONPATH=".:src" python3 src/manage.py test -v2 + +test: test_py2 test_py3 + +compile: + @echo Compiling python code + python -m compileall src/ + +compile_optimized: + @echo Compiling python code optimized + python -O -m compileall src/ coverage: @python --version coverage erase - PYTHONPATH="." coverage run --source='src' src/manage.py test tests --settings "tests.settings" + PYTHONPATH="." + DJANGO_SETTINGS_MODULE=tests.settings PYTHONPATH=".:src" coverage run --source='src' src/manage.py test -v2 coverage report + +travis: compile compile_optimized test_default_python coverage \ No newline at end of file diff --git a/src/manage.py b/src/manage.py old mode 100644 new mode 100755