Skip to content

Commit b8d013d

Browse files
committed
Add a test that call cargo doc for many crates in the ecosystem
I expect this to fail for now since we have a bug
1 parent 3c79608 commit b8d013d

File tree

1 file changed

+42
-13
lines changed

1 file changed

+42
-13
lines changed

.github/workflows/rust.yml

+42-13
Original file line numberDiff line numberDiff line change
@@ -22,26 +22,55 @@ jobs:
2222
- nightly
2323

2424
steps:
25-
- uses: actions/checkout@v2
26-
- uses: actions-rs/toolchain@v1
25+
- uses: actions/checkout@v4
26+
- uses: dtolnay/rust-toolchain@master
2727
with:
28-
profile: minimal
2928
toolchain: ${{ matrix.rust }}
30-
override: true
3129
- name: Run tests
3230
run: cargo test --verbose --all-features
3331
- name: Run docs
34-
run: cargo doc --verbose
32+
run: cargo doc --verbose
3533
format:
3634
runs-on: ubuntu-latest
3735
steps:
38-
- name: Checkout
39-
uses: actions/checkout@v2
40-
- name: Install latest stable
41-
uses: actions-rs/toolchain@v1
42-
with:
43-
toolchain: stable
44-
override: true
45-
components: rustfmt
36+
- uses: actions/checkout@v4
37+
- uses: dtolnay/rust-toolchain@stable
4638
- name: Run rustfmt
4739
run: cargo fmt --all -- --check
40+
41+
42+
crater:
43+
runs-on: ubuntu-latest
44+
steps:
45+
- uses: actions/checkout@v4
46+
- uses: dtolnay/rust-toolchain@stable
47+
- name: setup patch
48+
run: |
49+
echo "" >> ~/.cargo/config.toml
50+
echo [patch.crates-io] >> ~/.cargo/config.toml
51+
echo document-features = { path = \"$GITHUB_WORKSPACE\" } >> ~/.cargo/config.toml
52+
- name: create project and generate docs
53+
run: |
54+
cd ~
55+
cargo new crater
56+
cd crater
57+
cargo add quick-xml -F document-features
58+
cargo add serde_with -F guide
59+
cargo add serial_test -F document-features
60+
cargo add wpu-core
61+
cargo add wpu
62+
cargo add gix -F document-features
63+
cargo add kstring -F document-features
64+
cargo add ratatui -F document-features
65+
cargo add re_types
66+
cargo add slint -F document-features
67+
cargo add egui-winit -F document-features
68+
cargo add ehttp
69+
cargo add snapbox -F document-features
70+
cargo add fast-image-resize
71+
cargo add rhai -F document-features
72+
cargo add embassy-executor
73+
cargo add embassy-time
74+
75+
cargo doc
76+
not grep -r "No documented features in Cargo.toml" target/doc

0 commit comments

Comments
 (0)