diff --git a/.travis.yml b/.travis.yml index aa4416c6..768e8c14 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,7 +3,7 @@ dist: bionic sudo: true git: - depth: 1 + depth: 10 cache: - pip @@ -70,6 +70,16 @@ matrix: env: TEST=easy_install script: sudo python $TRAVIS_BUILD_DIR/install.py --user travis --run-travis --production --verbose +before_install: +- | + if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then + TRAVIS_COMMIT_RANGE="FETCH_HEAD...$TRAVIS_BRANCH" + fi + git diff --name-only $TRAVIS_COMMIT_RANGE | grep -qvE '\.md$|^docs' || { + echo "Only docs were updated, stopping build process." + exit + } + install: - pip install urllib3 pyOpenSSL ndg-httpsclient pyasn1