Skip to content

Commit

Permalink
Do not call cargo test with --all-targets
Browse files Browse the repository at this point in the history
The `--all-targets` flag for `cargo test` actually DISABLES doctests.
Doctests should of course be run, so removing the flag from the CI scrips.
There is a bug report for cargo about this behavior:
rust-lang/cargo#6669

This fixes the changes done in #235 / 9a6c3bf.
  • Loading branch information
jonasbb committed Jan 30, 2021
1 parent 8f4aaac commit 8eff5e0
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -103,17 +103,20 @@ jobs:
name: Test "No Default Features" (${{ matrix.os }} / ${{ matrix.rust }})
with:
command: test
args: --workspace --no-default-features --all-targets
# cargo test --all-targets does NOT run doctests
# since doctests are important this should not be added
# https://github.com/rust-lang/cargo/issues/6669
args: --workspace --no-default-features
- uses: actions-rs/cargo@v1
name: Test "Default" (${{ matrix.os }} / ${{ matrix.rust }})
with:
command: test
args: --workspace --all-targets
args: --workspace
- uses: actions-rs/cargo@v1
name: Test "All Features" (${{ matrix.os }} / ${{ matrix.rust }})
with:
command: test
args: --workspace --all-features --all-targets
args: --workspace --all-features

- name: Run cargo-tarpaulin
uses: actions-rs/tarpaulin@v0.1
Expand Down

0 comments on commit 8eff5e0

Please sign in to comment.