canonical / sphinx-docs-starter-pack

A documentation starter-pack
https://canonical-starter-pack.readthedocs-hosted.com/
Other
15 stars 40 forks source link

Exit 1 on failure #120

Closed ColmBhandal closed 1 year ago

ColmBhandal commented 1 year ago

Causes a non-zero exit status when there are woke findings. This in turn will fix the issue with failure reporting on the documentation GitHub workflow: https://github.com/canonical/documentation-workflows/issues/5#issuecomment-1744544831.

To test:

  1. Checkout main branch
  2. Edit some file to include a disallowed word (e.g. edit readme.rst by adding "master")
  3. Run make woke
  4. Observe that there is a "finding" reported by woke, warning of the use of the disallowed word
  5. Run echo $? immediately afterwards - it should output 0, indicating successful exit status

Repeat the above steps again on this branch. Notice that the command exits with non-zero exit status this time.

ru-fu commented 1 year ago

Oops, that push was supposed to go to my testing branch, not yours ... ;) But the good thing is, the test did what it was supposed to: https://github.com/ru-fu/starter-pack/actions/runs/6394238933/job/17355202715

Sorry for messing up your branch, and no clue why I could push before but not now. You could try just force-pushing your branch again (without fetching any updates). Otherwise, I still have your commit, you could cherry-pick it in again or I can open a new PR ... https://github.com/canonical/sphinx-docs-starter-pack/compare/main...ru-fu:starter-pack:119-exit-on-fail