Browse Source

Added .travis.yml and updated makefile

tags/0.3
Johann Schmitz 3 years ago
parent
commit
2a0a5eb253
2 changed files with 38 additions and 6 deletions
  1. 17
    0
      .travis.yml
  2. 21
    6
      Makefile

+ 17
- 0
.travis.yml View File

@@ -0,0 +1,17 @@
language: python
python:
- 2.7
- 3.3
- 3.4
- 3.5
- pypy
- nightly # 3.6

install:
#- pip install -r requirements.txt
- pip install coveralls

script: make travis

after_success:
- coveralls

+ 21
- 6
Makefile View File

@@ -1,14 +1,29 @@
TARGET?=tests

test: test-py2 test-py3
test_default_python:
PYTHONPATH=".:./src" python tests/ -v

test-py2:
PYTHONPATH=".:./src" python2 tests/
test_py2:
@echo Executing test with python2
PYTHONPATH=".:./src" python2 tests/ -v

test-py3:
PYTHONPATH=".:./src" python3 tests/
test_py3:
@echo Executing test with python3
PYTHONPATH=".:./src" python3 tests/ -v

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:
coverage erase
PYTHONPATH=".:./src" coverage run --source='src' --omit='src/test.py' --branch tests/__main__.py
PYTHONPATH=".:./src" coverage run --source='src' --branch tests/__main__.py
coverage report -m

travis: compile compile_optimized test_default_python coverage

Loading…
Cancel
Save