Skip to content
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

Add CI check for documentation deploy errors #2378

Merged
merged 2 commits into from
Nov 26, 2023

Conversation

tlylt
Copy link
Contributor

@tlylt tlylt commented Nov 21, 2023

What is the purpose of this pull request?

  • Documentation update
  • Bug fix
  • Feature addition or enhancement
  • Code maintenance
  • DevOps
  • Improve developer experience
  • Others, please explain:

Overview of changes:
Fixes #2335

Anything you'd like to highlight/discuss:
Did no include a check for deployment warnings because it will also capture false positives (when building UG and DG separately there are unavoidable warnings for broken links)

Testing instructions:
I tested the bash script locally, by

  • cd docs
  • markbind serve -d to serve the documentation site and also let it generate a log file in docs/_markbind/logs
  • at this point the logs will have no "error" or warnings
  • put the bash script in a file, e.g. test.sh
#!/usr/bin/env bash
log_file="docs/_markbind/logs/markbind-$(date +'%Y-%m-%d').log"
pattern="^[0-9T:.Z-]+ - error:"

if grep -q -E "$pattern" "$log_file"; then
printf "The following issues were found when deploying the documentation:\n"
grep -E "$pattern" "$log_file"
exit 1
fi
  • then run bash test.sh, should observe nothing in the command line
  • now change one of the log lines inside the log file from .... - info to .... - error
  • rerun bash test.sh, should observe something like:
$ bash test.sh
The following issues were found when deploying the documentation:
2023-11-21T12:48:33.072Z - error: Pages built

Proposed commit message: (wrap lines at 72 characters)
Add CI check for documentation deploy errors


Checklist: ☑️

  • Updated the documentation for feature additions and enhancements
  • Added tests for bug fixes or features
  • Linked all related issues
  • No unrelated changes

Reviewer checklist:

Indicate the SEMVER impact of the PR:

  • Major (when you make incompatible API changes)
  • Minor (when you add functionality in a backward compatible manner)
  • Patch (when you make backward compatible bug fixes)

At the end of the review, please label the PR with the appropriate label: r.Major, r.Minor, r.Patch.

Breaking change release note preparation (if applicable):

  • To be included in the release note for any feature that is made obsolete/breaking

Give a brief explanation note about:

  • what was the old feature that was made obsolete
  • any replacement feature (if any), and
  • how the author should modify his website to migrate from the old feature to the replacement feature (if possible).

Copy link
Contributor

@ong6 ong6 left a comment

Choose a reason for hiding this comment

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

LGTM

@tlylt tlylt added the r.Patch Version resolver: increment by 0.0.1 label Nov 26, 2023
@tlylt tlylt added this to the v5.1.1 milestone Nov 26, 2023
Copy link

codecov bot commented Nov 26, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (17b3178) 45.66% compared to head (7c25f7f) 45.66%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2378   +/-   ##
=======================================
  Coverage   45.66%   45.66%           
=======================================
  Files         123      123           
  Lines        5199     5199           
  Branches     1097     1097           
=======================================
  Hits         2374     2374           
  Misses       2506     2506           
  Partials      319      319           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@tlylt tlylt merged commit c7d912d into MarkBind:master Nov 26, 2023
8 checks passed
@tlylt tlylt deleted the check-deploy-ci branch November 26, 2023 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
r.Patch Version resolver: increment by 0.0.1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add CI check for warnings & errors when deploying docs
2 participants