Skip to content

Commit

Permalink
Ignore doctests in 'test' step on CI
Browse files Browse the repository at this point in the history
The CI step for `cargo test` runs all tests _and_ doctests at the
same time, followed by `cargo test --doc` which runs just doctests.
This actually means we have been running doctests twice when we only
intend to run them once.

This adds an explicit command of `cargo test --lib --bins --tests` to
run all tests _except_ the doctests, so that the doctests can run
separately with `cargo test --doc`.
  • Loading branch information
bitwizeshift committed Sep 28, 2024
1 parent b06bc71 commit 2310aa9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/build-and-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:

- name: Test
id: test
run: cargo test --verbose
run: cargo test --lib --bins --tests --verbose

- name: Doctest
run: cargo test --doc --verbose
Expand Down

0 comments on commit 2310aa9

Please sign in to comment.