-
Notifications
You must be signed in to change notification settings - Fork 479
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
Make CI builds fail when building docs fails #527
Comments
Build stages is the way to go here: https://docs.travis-ci.com/user/build-stages But you can also just run Documenter in your tests (i.e. have the |
Interesting. Any idea what a .travis.yml file using stages could look like? |
I played around with them a bit when they came out: Edit: I think for a package the it would look like: jobs:
include:
- stage: "Deploy docs"
julia: nightly
os: linux
script: julia --color=yes -e 'Pkg.add("Documenter")'
&& julia --color=yes docs/make.jl deploy Edit2: Note that I have "deploy" in ARGS && deploydocs(
repo = "github.com/JuliaDocs/Documenter.jl.git",
target = "build",
deps = nothing,
make = nothing,
) |
Looks great. We should probably wait for Build Stages to be out of beta status, and then recommend it? |
Yup, that was partially why I didn't go much further than just playing with it at the time. |
Hello, Thanks for this great documentation generator that we extensively use in our projects.
Would you mind extending a tiny bit on this approach? Which |
Just |
Thanks for your reply. I tried with your example and it understands the "Deploy Docs job", but there are many fails (on purpose) and it still gives the green tick. Details here |
This is now the recommended way and has been documented. |
The current recommended Travis CI configuration does not mark a package's build as failed when the docs fail to build. This is problematic since it means the documentation can silently fail to be updated. In particular, doctests can fail due to changes done in a PR without the CI checks making this apparent.
Wouldn't it make sense to make builds fail by default if docs failed to build? Or is that difficult to implement?
The text was updated successfully, but these errors were encountered: