diff --git a/.travis.yml b/.travis.yml index 0afd53d5d6..ee29d1fc23 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,14 +11,6 @@ dist: trusty matrix: include: - - os: linux - language: python - python: 3.6 - env: DOC_BUILD=1 - - os: linux - language: python - python: 3.6 - env: FORMATTING=1 - os: linux language: generic env: USE_PYPY_NIGHTLY=1 @@ -31,6 +23,14 @@ matrix: - os: osx language: generic env: MACPYTHON=3.6.0 + - os: linux + language: python + python: 3.6 + env: CHECK_DOCS=1 + - os: linux + language: python + python: 3.6 + env: CHECK_FORMATTING=1 script: - ci/travis.sh diff --git a/ci/travis.sh b/ci/travis.sh index cdaeea162a..ec4f0d92a1 100755 --- a/ci/travis.sh +++ b/ci/travis.sh @@ -56,36 +56,37 @@ fi pip install -U pip setuptools wheel -python setup.py sdist --formats=zip -pip install dist/*.zip - -if [ "$DOC_BUILD" = "1" ]; then - pip install -Ur ci/rtd-requirements.txt - cd docs - # -n (nit-picky): warn on missing references - # -W: turn warnings into errors - sphinx-build -nW -b html source build -elif [ "$FORMATTING" = "1" ]; then +if [ "$CHECK_FORMATTING" = "1" ]; then pip install -U yapf - yapf -rdp setup.py trio > formatting-fixes.patch - if [ -s formatting-fixes.patch ]; then + if ! yapf -rpd setup.py trio; then cat <