summaryrefslogtreecommitdiff
path: root/.travis.yml
diff options
context:
space:
mode:
authorYobmod <yobmod@gmail.com>2021-06-17 17:38:42 +0100
committerYobmod <yobmod@gmail.com>2021-06-17 17:38:42 +0100
commit3a84459c6a5a1d8a81e4a51189091ef135e1776e (patch)
treee1207dbe034f82deacbb76369716779608e7056d /.travis.yml
parentdf39446bb7b90ab9436fa3a76f6d4182c2a47da2 (diff)
parent636f77bf8d58a482df0bde8c0a6a8828950a0788 (diff)
downloadgitpython-3a84459c6a5a1d8a81e4a51189091ef135e1776e.tar.gz
add travis
Diffstat (limited to '.travis.yml')
-rw-r--r--.travis.yml46
1 files changed, 46 insertions, 0 deletions
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 00000000..1bed8368
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,46 @@
+# UNUSED, only for reference. If adjustments are needed, please see github actions
+language: python
+python:
+<<<<<<< HEAD
+ - "3.4"
+=======
+>>>>>>> b0f79c58ad919e90261d1e332df79a4ad0bc40de
+ - "3.6"
+ - "3.7"
+ - "3.8"
+ - "nightly"
+ # - "pypy" - won't work as smmap doesn't work (see gitdb/.travis.yml for details)
+matrix:
+ allow_failures:
+ - python: "nightly"
+git:
+ # a higher depth is needed for most of the tests - must be high enough to not actually be shallow
+ # as we clone our own repository in the process
+ depth: 99999
+install:
+ - python --version; git --version
+ - git submodule update --init --recursive
+ - git fetch --tags
+ - pip install -r test-requirements.txt
+ - pip install -r doc/requirements.txt
+ - pip install codecov
+
+ # generate some reflog as git-python tests need it (in master)
+ - ./init-tests-after-clone.sh
+
+ # as commits are performed with the default user, it needs to be set for travis too
+ - git config --global user.email "travis@ci.com"
+ - git config --global user.name "Travis Runner"
+ # If we rewrite the user's config by accident, we will mess it up
+ # and cause subsequent tests to fail
+ - cat git/test/fixtures/.gitconfig >> ~/.gitconfig
+script:
+ # Make sure we limit open handles to see if we are leaking them
+ - ulimit -n 128
+ - ulimit -n
+ - coverage run --omit="test/*" -m unittest --buffer
+ - coverage report
+ - if [ "$TRAVIS_PYTHON_VERSION" == '3.6' ]; then cd doc && make html; fi
+ - if [ "$TRAVIS_PYTHON_VERSION" == '3.6' ]; then flake8 --ignore=W293,E265,E266,W503,W504,E731; fi
+after_success:
+ - codecov