ci
Detecting CI environments and reporting pipeline status.
detect, is_ci and is_pull_request take the environment as a lookup function instead of reading it,
so they are as easy to test as to use (&|name| std::env::var(name).ok()). Status, overall and
render_report turn job results into the Markdown summary of a PR comment.
Install
Section titled “Install”Cargo feature ci (enabled by default). To compile only this module:
or in Cargo.toml:
Import path: helpers4::ci.
| Item | What it does |
|---|---|
detect | Which CI service the environment belongs to, if any. |
is_ci | Whether the environment looks like a CI run. |
is_pull_request | Whether the current CI run was triggered by a pull request (or merge request). |
overall | The single status that sums up several: the worst one wins. |
Provider | A continuous-integration service, as recognized by detect. |
render_report | A Markdown summary of a pipeline, ready for a PR comment or a job summary. |
Status | The outcome of a CI job or step. |
