From 137d21a9983aeb2eecfb0a59e948f59222cd69aa Mon Sep 17 00:00:00 2001 From: dzhuang Date: Sat, 2 Sep 2017 23:59:15 +0800 Subject: [PATCH] Added .travis.yml --- .travis.yml | 11 +++++++++++ README.rst | 6 ++++++ run-coveralls.sh | 7 +++++++ run-tests-for-ci.sh | 3 +-- 4 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 .travis.yml create mode 100644 run-coveralls.sh diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 00000000..17906f72 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,11 @@ +language: python +python: + - "2.7" + - "3.5" +install: true +script: + - bash ./run-coveralls.sh +env: + - if [[$TRAVIS_PYTHON_VERSION = "2.7"]]; then PY_EXE=python2.7; else PY_EXE=python3.5; fi +after_success: + - coveralls \ No newline at end of file diff --git a/README.rst b/README.rst index e44fa5c0..b9f9f04d 100644 --- a/README.rst +++ b/README.rst @@ -1,3 +1,9 @@ +.. image:: https://travis-ci.org/inducer/relate.svg + :target: https://travis-ci.org/inducer/relate + +.. image:: https://coveralls.io/repos/inducer/relate/badge.svg + :target: https://coveralls.io/r/inducer/relate + RELATE ====== diff --git a/run-coveralls.sh b/run-coveralls.sh new file mode 100644 index 00000000..5db8c404 --- /dev/null +++ b/run-coveralls.sh @@ -0,0 +1,7 @@ +#! /bin/bash + +source $(dirname $0)/run-tests-for-ci.sh + +$PIP install coveralls + +coverage run --source=. manage.py test test/ diff --git a/run-tests-for-ci.sh b/run-tests-for-ci.sh index 0d36dd9b..1e477cae 100644 --- a/run-tests-for-ci.sh +++ b/run-tests-for-ci.sh @@ -68,5 +68,4 @@ $PIP install -r req.txt cp local_settings.example.py local_settings.py -cd test -python ../manage.py test +python manage.py test test/ -- GitLab