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 @@
1
+language: python
2
+python:
3
+  - 2.7
4
+  - 3.3
5
+  - 3.4
6
+  - 3.5
7
+  - pypy
8
+  - nightly # 3.6
9
+
10
+install:
11
+#- pip install -r requirements.txt
12
+- pip install coveralls
13
+
14
+script: make travis
15
+
16
+after_success:
17
+  - coveralls

+ 21
- 6
Makefile View File

@@ -1,14 +1,29 @@
1 1
 TARGET?=tests
2 2
 
3
-test: test-py2 test-py3
3
+test_default_python:
4
+	PYTHONPATH=".:./src" python tests/ -v
4 5
 
5
-test-py2:
6
-	PYTHONPATH=".:./src" python2 tests/
6
+test_py2:
7
+	@echo Executing test with python2
8
+	PYTHONPATH=".:./src" python2 tests/ -v
7 9
 
8
-test-py3:
9
-	PYTHONPATH=".:./src" python3 tests/
10
+test_py3:
11
+	@echo Executing test with python3
12
+	PYTHONPATH=".:./src" python3 tests/ -v
13
+
14
+test: test_py2 test_py3
15
+
16
+compile:
17
+	@echo Compiling python code
18
+	python -m compileall src/
19
+
20
+compile_optimized:
21
+	@echo Compiling python code optimized
22
+	python -O -m compileall src/
10 23
 
11 24
 coverage:
12 25
 	coverage erase
13
-	PYTHONPATH=".:./src" coverage run --source='src' --omit='src/test.py' --branch tests/__main__.py
26
+	PYTHONPATH=".:./src" coverage run --source='src' --branch tests/__main__.py
14 27
 	coverage report -m
28
+
29
+travis: compile compile_optimized test_default_python coverage

Loading…
Cancel
Save