Repository navigation
Fail check-all-examples on deprecation warnings only - #127
Merged
Merged
Conversation
Other warnings, which some examples raise on purpose, are shown as annotations.
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues were identified, and the workflow and documentation changes align with the intended warning-handling behavior.
No open issues 🎉
What changed in this PR
Updates the all-examples workflow so intentional non-deprecation warnings no longer fail CI, while deprecation warnings and example errors still do. The README documentation reflects the revised behavior.
Changes:
- Classifies base R, lifecycle, and text-based deprecation warnings.
- Emits GitHub warning and error annotations while allowing examples to continue after warnings.
- Fails the workflow when deprecations or example errors are detected.
| File | Description |
|---|---|
| README.Rmd | Updates the workflow description in the README source to document the revised warning and deprecation handling. |
| README.md | Updates the rendered workflow description to match the revised warning and deprecation handling. |
| .github/workflows/check-all-examples.yaml | Classifies warnings, emits GitHub annotations, and defers workflow failure for deprecations or example errors. |
Review effort: Lite
strengejacke
approved these changes
Nov 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #120.
check-all-examples.yamlsetsoptions(warn = 2L), so every warning in an example becomes an error. On insight #1305, this failed the check on the?is_convergedexample, whoseglmer()model doesn't converge on purpose.As asked in #120, the check now fails only on deprecation warnings. A warning counts as one if it has class
deprecatedWarning(base R's.Deprecated()) orlifecycle_warning_deprecated(lifecycle), or if its message contains "deprecated" or "defunct". The text match is for easystats' own deprecation warnings, whichinsight::format_warning()raises as plain warnings. It also catches deprecations from other packages that an example uses.Each deprecation warning shows up as an error annotation naming the Rd file. Other warnings show up as warning annotations and don't fail the check. The examples keep running after a warning, but
run_examples()still stops at the first example that errors (#63). I updated the README row to match.I ran the step's R code locally on small test packages. An example with an intentional warning fails on main and passes here with a warning annotation. Examples using
.Deprecated(),lifecycle::deprecate_warn()and plain warnings mentioning "deprecated" or "defunct" each got an error annotation and failed the step, while a plain warning didn't. actionlint is clean.I also pointed insight's check-all-examples caller at this branch from a test branch on my fork. All 115 example files ran and the check passed, with the
?is_convergedconvergence warnings and one in?format_messageshown as warning annotations: https://github.com/jmgirard/insight/actions/runs/46480608631