Browse Source

Updated Makefile, added .travis.yml

Johann Schmitz 2 years ago
parent
commit
154aa20950
Signed by: Johann Schmitz <johann@j-schmitz.net> GPG Key ID: A084064277C501ED
4 changed files with 64 additions and 3 deletions
  1. 1
    0
      .gitignore
  2. 39
    0
      .travis.yml
  3. 24
    3
      Makefile
  4. 0
    0
      src/manage.py

+ 1
- 0
.gitignore View File

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

+ 39
- 0
.travis.yml View File

@@ -0,0 +1,39 @@
1
+language: python
2
+sudo: False
3
+python:
4
+- 2.7
5
+- 3.3
6
+- 3.4
7
+- 3.5
8
+- pypy
9
+- nightly # 3.6
10
+env:
11
+  matrix:
12
+  - DJANGO="1.7"
13
+  - DJANGO="1.8"
14
+  - DJANGO="1.9"
15
+
16
+install:
17
+- pip install -r requirements.txt
18
+- pip install -r requirements_dev.txt
19
+- pip install "django==$DJANGO"
20
+
21
+#Django version	Python versions
22
+#1.8	          2.7, 3.2 (until the end of 2016), 3.3, 3.4, 3.5
23
+#1.9, 1.10      2.7, 3.4, 3.5
24
+matrix:
25
+  exclude:
26
+    # Django 1.9+ no longer supports python 3.2/3.3
27
+  - python: 3.3
28
+    env: DJANGO="1.9"
29
+
30
+  # django 1.7 isn't supported on python > 3.4
31
+  - python: 3.5
32
+    env: DJANGO="1.7"
33
+  - python: nightly
34
+    env: DJANGO="1.7"
35
+
36
+script: make travis
37
+
38
+after_success:
39
+- coveralls

+ 24
- 3
Makefile View File

@@ -1,11 +1,32 @@
1 1
 TARGET?=tests
2 2
 
3
-test:
3
+test_default_python:
4 4
 	@python --version
5
-	DJANGO_SETTINGS_MODULE=tests.settings PYTHONPATH=".:src" django-admin.py test ${TARGET} -v2
5
+	DJANGO_SETTINGS_MODULE=tests.settings PYTHONPATH=".:src" src/manage.py test -v2
6
+
7
+test_py2:
8
+	@python --version
9
+	DJANGO_SETTINGS_MODULE=tests.settings PYTHONPATH=".:src" python2 src/manage.py test -v2
10
+
11
+test_py3:
12
+	@python --version
13
+	DJANGO_SETTINGS_MODULE=tests.settings PYTHONPATH=".:src" python3 src/manage.py test -v2
14
+
15
+test: test_py2 test_py3
16
+
17
+compile:
18
+	@echo Compiling python code
19
+	python -m compileall src/
20
+
21
+compile_optimized:
22
+	@echo Compiling python code optimized
23
+	python -O -m compileall src/
6 24
 
7 25
 coverage:
8 26
 	@python --version
9 27
 	coverage erase
10
-	PYTHONPATH="." coverage run --source='src' src/manage.py test tests --settings "tests.settings"
28
+	PYTHONPATH="."
29
+	DJANGO_SETTINGS_MODULE=tests.settings PYTHONPATH=".:src" coverage run --source='src' src/manage.py test -v2
11 30
 	coverage report
31
+
32
+travis: compile compile_optimized test_default_python coverage

+ 0
- 0
src/manage.py View File