Skip to content

DOC: Making the build fail if the doc build fails #24292

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Dec 16, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 4 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,23 +60,19 @@ matrix:
apt:
packages:
- xsel

# In allow_failures
- dist: trusty
env:
- JOB="3.6, slow" ENV_FILE="ci/deps/travis-36-slow.yaml" PATTERN="slow"
- JOB="3.6, doc" ENV_FILE="ci/deps/travis-36-doc.yaml" DOC=true

# In allow_failures
- dist: trusty
env:
- JOB="3.6, doc" ENV_FILE="ci/deps/travis-36-doc.yaml" DOC=true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

leave all of this

i am not convinced this build is actually reliable enough to change this

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You'll know better, I just thought that it'd be a good idea to make it break the build for a while, to see if it's actually reliable. Other than taking too long, does it fails with false positives often for any reason?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's make that an independent change.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fair enough, reverted that part

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW, the travis build here is only failing when the sphinx build is completely failing, not when there is an error in the doc build. So that shouldn't happen too often.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, the doc build is failing on travis now. But I am wondering if this is because of "fatal: No such remote: origin".
In that case, we should either fix that to not try to push the docs the github repo on PRs, or revert this PR, as it will currently always fail on PRs.

- JOB="3.6, slow" ENV_FILE="ci/deps/travis-36-slow.yaml" PATTERN="slow"

allow_failures:
- dist: trusty
env:
- JOB="3.6, slow" ENV_FILE="ci/deps/travis-36-slow.yaml" PATTERN="slow"
- dist: trusty
env:
- JOB="3.6, doc" ENV_FILE="ci/deps/travis-36-doc.yaml" DOC=true

before_install:
- echo "before_install"
Expand Down Expand Up @@ -106,7 +102,7 @@ before_script:
script:
- echo "script start"
- source activate pandas-dev
- ci/run_build_docs.sh
- ci/build_docs.sh
- ci/run_tests.sh

after_script:
Expand Down
2 changes: 2 additions & 0 deletions ci/build_docs.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash

set -e

if [ "${TRAVIS_OS_NAME}" != "linux" ]; then
echo "not doing build_docs on non-linux"
exit 0
Expand Down
10 changes: 0 additions & 10 deletions ci/run_build_docs.sh

This file was deleted.

5 changes: 4 additions & 1 deletion doc/make.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,10 @@ def _run_os(*args):
# TODO check_call should be more safe, but it fails with
# exclude patterns, needs investigation
# subprocess.check_call(args, stderr=subprocess.STDOUT)
os.system(' '.join(args))
exit_status = os.system(' '.join(args))
if exit_status:
msg = 'Command "{}" finished with exit code {}'
raise RuntimeError(msg.format(' '.join(args), exit_status))

def _sphinx_build(self, kind):
"""Call sphinx to build documentation.
Expand Down