Skip to content

Commit 2e79c55

Browse files
committed
Add CI job to test the equivalent of a docs.rs build.
1 parent 2564ca4 commit 2e79c55

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

.github/workflows/ci.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,22 @@ jobs:
313313
RUST_BACKTRACE: 1
314314
TRYBUILD: overwrite
315315

316+
docsrs:
317+
if: ${{ contains(github.event.pull_request.labels.*.name, 'CI-build-full') || (github.event_name != 'pull_request' && github.ref != 'refs/heads/main') }}
318+
needs: [fmt]
319+
runs-on: ubuntu-latest
320+
steps:
321+
- uses: actions/checkout@v4
322+
- uses: actions/setup-python@v4
323+
- uses: Swatinem/rust-cache@v2
324+
with:
325+
key: cargo-careful
326+
continue-on-error: true
327+
- uses: dtolnay/rust-toolchain@nightly
328+
with:
329+
components: rust-src
330+
- run: cargo rustdoc --lib --no-default-features --features "macros num-bigint num-complex hashbrown serde multiple-pymethods indexmap eyre either chrono rust_decimal" -Zunstable-options --config "build.rustdocflags=[\"--cfg\", \"docsrs\"]"
331+
316332
coverage:
317333
needs: [fmt]
318334
name: coverage-${{ matrix.os }}
@@ -387,6 +403,8 @@ jobs:
387403
run: nox -s test-emscripten
388404

389405
test-debug:
406+
needs: [fmt]
407+
if: github.ref != 'refs/heads/main'
390408
runs-on: ubuntu-latest
391409
steps:
392410
- uses: actions/checkout@v4
@@ -438,6 +456,7 @@ jobs:
438456
- build-full
439457
- valgrind
440458
- careful
459+
- docsrs
441460
- coverage
442461
- emscripten
443462
if: always()

0 commit comments

Comments
 (0)