Skip to content

Commit 4e7ba27

Browse files
Add doctests (as nextest doesn't do these yet) (#101)
1 parent 04c9518 commit 4e7ba27

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

.github/workflows/check.yaml

+25-1
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:
@@ -148,4 +151,25 @@ jobs:
148151
with:
149152
name: test-results
150153
path: testresults--all-features.json
151-
154+
155+
doctest:
156+
# Run doctests separately, as nextest doesn't yet (https://github.com/nextest-rs/nextest/issues/16)
157+
outputs:
158+
test_results_url: ${{ steps.doctest_results.outputs.artifact-url }}
159+
runs-on: ubuntu-latest
160+
env:
161+
RUSTDOCFLAGS: -Dwarnings
162+
steps:
163+
- uses: actions/checkout@v4
164+
- uses: dtolnay/rust-toolchain@master
165+
with:
166+
toolchain: ${{ env.RUST_TOOLCHAIN }}
167+
- name: Run doc tests
168+
run: |
169+
RUSTC_BOOTSTRAP=1 cargo test --doc -- -Z unstable-options --format json --report-time > doctestresults--all-features.json
170+
- name: Upload doctest results artifact
171+
id: doctest_results
172+
uses: actions/upload-artifact@v4
173+
with:
174+
name: doctest-results
175+
path: doctestresults--all-features.json

0 commit comments

Comments
 (0)