Skip to content

Commit

Permalink
Merge #253
Browse files Browse the repository at this point in the history
253: Do not call `cargo test` with `--all-targets` r=jonasbb a=jonasbb

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.

Co-authored-by: Jonas Bushart <jonas@bushart.org>
  • Loading branch information
bors[bot] and jonasbb authored Jan 30, 2021
2 parents 8f4aaac + e86bdc8 commit 90881b3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 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
3 changes: 2 additions & 1 deletion src/rust.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1829,7 +1829,8 @@ pub mod default_on_null {
/// # use serde::Deserialize;
/// use serde_with::rust::deserialize_ignore_any;
///
/// #[derive(Deserialize, Debug)]
/// # #[derive(Debug, PartialEq)]
/// #[derive(Deserialize)]
/// #[serde(rename_all = "lowercase")]
/// enum Item {
/// Foo(String),
Expand Down

0 comments on commit 90881b3

Please sign in to comment.