Skip to content

Commit c44100d

Browse files
committed
Add doctests (as nextest doesn't do these yet)
1 parent 8048bc0 commit c44100d

File tree

1 file changed

+26
-1
lines changed

1 file changed

+26
-1
lines changed

.github/workflows/check.yaml

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ on:
3131
test_results_url:
3232
description: "URL of the test results artifact"
3333
value: ${{ jobs.nextest.outputs.test_results_url }}
34+
doctest_results_url:
35+
description: "URL of the doctest results artifact"
36+
value: ${{ jobs.doctest.outputs.test_results_url }}
3437
workflow_dispatch:
3538

3639
concurrency:
@@ -147,4 +150,26 @@ jobs:
147150
with:
148151
name: test-results
149152
path: testresults--all-features.json
150-
153+
154+
doctest:
155+
# Run doctests separately, as nextest doesn't yet (https://github.com/nextest-rs/nextest/issues/16)
156+
outputs:
157+
test_results_url: ${{ steps.doctest_results.outputs.artifact-url }}
158+
runs-on: ubuntu-latest
159+
env:
160+
RUSTDOCFLAGS: -Dwarnings
161+
steps:
162+
- uses: actions/checkout@v4
163+
- uses: dtolnay/rust-toolchain@master
164+
with:
165+
toolchain: ${{ env.RUST_TOOLCHAIN }}
166+
- name: Run doc tests
167+
run: |
168+
cargo test --doc --all-features > doctestresults--all-features.json
169+
- name: Upload doctest results artifact
170+
id: doctest_results
171+
uses: actions/upload-artifact@v4
172+
with:
173+
name: doctest-results
174+
path: doctestresults--all-features.json
175+

0 commit comments

Comments
 (0)