Browse Source

Updated Makefile, added .travis.yml

master
Johann Schmitz 5 years ago
parent
commit
154aa20950
Signed by: ercpe GPG Key ID: A084064277C501ED
  1. 1
      .gitignore
  2. 39
      .travis.yml
  3. 27
      Makefile
  4. 0
      src/manage.py

1
.gitignore

@ -1,5 +1,6 @@
.idea/
*.pyc
*.pyo
__pycache__
src/gitbrowser/settings/dev.py

39
.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

27
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

0
src/manage.py