Skip to content

Commit 1411289

Browse files
authored
Merge pull request #1654 from EliahKagan/doctest-workspace
Run doctests across the workspace on CI
2 parents 697a632 + 0783e9c commit 1411289

File tree

5 files changed

+18
-14
lines changed

5 files changed

+18
-14
lines changed

.github/workflows/ci.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -67,16 +67,16 @@ jobs:
6767
brew install tree openssl gnu-sed
6868
- name: "cargo check default features"
6969
if: startsWith(matrix.os, 'windows')
70-
run: cargo check --all --bins --examples
70+
run: cargo check --workspace --bins --examples
7171
- uses: taiki-e/install-action@v2
7272
with:
7373
tool: nextest
7474
- name: "Test (nextest)"
7575
env:
7676
GIX_TEST_CREATE_ARCHIVES_EVEN_ON_CI: 1
77-
run: cargo nextest run --all --no-fail-fast
77+
run: cargo nextest run --workspace --no-fail-fast
7878
- name: Doctest
79-
run: cargo test --doc
79+
run: cargo test --workspace --doc --no-fail-fast
8080
- name: Check that tracked archives are up to date
8181
run: git diff --exit-code # If this fails, the fix is usually to commit a regenerated archive.
8282

gix-merge/src/blob/builtin_driver/text/mod.rs

+6-5
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,21 @@ pub enum ConflictStyle {
88
/// Only show the zealously minified conflicting lines of the local changes and the incoming (other) changes,
99
/// hiding the base version entirely.
1010
///
11-
/// ```
11+
/// ```text
1212
/// line1-changed-by-both
1313
/// <<<<<<< local
1414
/// line2-to-be-changed-in-incoming
1515
/// =======
1616
/// line2-changed
1717
/// >>>>>>> incoming
18-
///```
18+
/// ```
1919
#[default]
2020
Merge,
2121
/// Show non-minimized hunks of local changes, the base, and the incoming (other) changes.
2222
///
2323
/// This mode does not hide any information.
24-
/// ```
24+
///
25+
/// ```text
2526
/// <<<<<<< local
2627
/// line1-changed-by-both
2728
/// line2-to-be-changed-in-incoming
@@ -32,12 +33,12 @@ pub enum ConflictStyle {
3233
/// line1-changed-by-both
3334
/// line2-changed
3435
/// >>>>>>> incoming
35-
///```
36+
/// ```
3637
Diff3,
3738
/// Like [`Diff3](Self::Diff3), but will show *minimized* hunks of local change and the incoming (other) changes,
3839
/// as well as non-minimized hunks of the base.
3940
///
40-
/// ```
41+
/// ```text
4142
/// line1-changed-by-both
4243
/// <<<<<<< local
4344
/// line2-to-be-changed-in-incoming

gix-merge/src/blob/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ pub struct Driver {
9696
///
9797
/// A typical invocation with all arguments substituted could then look like this:
9898
///
99-
/// ```
99+
/// ```sh
100100
/// <driver-program> .merge_file_nR2Qs1 .merge_file_WYXCJe .merge_file_UWbzrm 7 file e2a2970 HEAD feature
101101
/// ```
102102
///

gix-pack/src/index/mod.rs

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//! an index into the pack file
2-
//!
2+
33
/// From itertools
44
/// Create an iterator running multiple iterators in lockstep.
55
///
@@ -21,7 +21,7 @@
2121
///
2222
/// [`multizip`]: fn.multizip.html
2323
///
24-
/// ```
24+
/// ```ignore
2525
/// # use itertools::izip;
2626
/// #
2727
/// # fn main() {
@@ -37,6 +37,9 @@
3737
/// assert_eq!(results, [0 + 3, 10 + 7, 29, 36]);
3838
/// # }
3939
/// ```
40+
///
41+
/// (The above is vendored from [itertools](https://github.com/rust-itertools/itertools),
42+
/// including the original doctest, though it has been marked `ignore` here.)
4043
macro_rules! izip {
4144
// @closure creates a tuple-flattening closure for .map() call. usage:
4245
// @closure partial_pattern => partial_tuple , rest , of , iterators

justfile

+3-3
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ clippy-fix:
3838

3939
# Build all code in suitable configurations
4040
check:
41-
cargo check --all
41+
cargo check --workspace
4242
cargo check --no-default-features --features small
4343
# assure compile error occurs
4444
if cargo check --features lean-async 2>/dev/null; then false; else true; fi
@@ -146,8 +146,8 @@ check:
146146

147147
# Run cargo doc on all crates
148148
doc $RUSTDOCFLAGS="-D warnings":
149-
cargo doc --all --no-deps --features need-more-recent-msrv
150-
cargo doc --features=max,lean,small --all --no-deps --features need-more-recent-msrv
149+
cargo doc --workspace --no-deps --features need-more-recent-msrv
150+
cargo doc --features=max,lean,small --workspace --no-deps --features need-more-recent-msrv
151151

152152
# run all unit tests
153153
unit-tests:

0 commit comments

Comments
 (0)