diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-07-20 05:40:26 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-07-20 05:40:26 +0800 |
| commit | 92e5eb1c6a8661cd3acb9c9baf3042361ad4f242 (patch) | |
| tree | 0579c87248b887c83c965abf4c2a30332bd9d84e | |
| parent | 6016d3cae3b47d301fee8a871ddbd83d20223b26 (diff) | |
feat(ci): collect all doc-phase errors before failing
| -rw-r--r-- | .run/src/bin/ci.rs | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/.run/src/bin/ci.rs b/.run/src/bin/ci.rs index 2527ece..f3ae9e8 100644 --- a/.run/src/bin/ci.rs +++ b/.run/src/bin/ci.rs @@ -123,14 +123,26 @@ fn ci(test_docs: bool, test_codes: bool, run_all: bool) -> Result<(), i32> { } if run_all || test_docs { - println_cargo_style!("Phase: Test all examples"); - test_examples()?; + let mut exit_code = 0; println_cargo_style!("Phase: Verify all *.md document code blocks are compilable"); - test_docs_code_blocks()?; + if let Err(code) = test_docs_code_blocks() { + exit_code = exit_code.max(code); + } + + println_cargo_style!("Phase: Test all examples"); + if let Err(code) = test_examples() { + exit_code = exit_code.max(code); + } println_cargo_style!("Phase: Check all documentation is up to date"); - docs_refresh()?; + if let Err(code) = docs_refresh() { + exit_code = exit_code.max(code); + } + + if exit_code != 0 { + return Err(exit_code); + } } run_cmd!("git add --renormalize .")?; |
