diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9ce8a9c..2c2d139 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,34 +9,18 @@ on: jobs: build: - runs-on: ubuntu-latest + strategy: + matrix: + os: [ubuntu-latest, macos-latest] + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - - name: Run tests (including doctests) - run: cargo test -F full - - name: Install cargo-hack + - name: Install tools uses: taiki-e/install-action@v2 with: - tool: cargo-hack - - name: Check a few configurations - run: | - cargo hack --feature-powerset --exclude-features=default,full check - - name: Run examples - shell: bash - run: | - pushd merde - EXAMPLES=($(cd examples && for i in *; do echo "${i%.rs}"; done)) - for example in "${EXAMPLES[@]}"; do - cargo run --features full,ahash --example "$example" - done - popd - - name: Test zerodeps-example + tool: cargo-hack,just + - name: Run tests shell: bash run: | - pushd zerodeps-example - cargo check - cargo check --features=merde - cargo tree --prefix none --no-dedupe | grep -v compact_str - cargo tree --prefix none --no-dedupe --features=merde | grep compact_str - popd + just diff --git a/Justfile b/Justfile index 6e67ef6..567bf4d 100644 --- a/Justfile +++ b/Justfile @@ -1,8 +1,13 @@ check: #!/bin/bash -eux + cargo check --all-targets + cargo check --all-features --all-targets + cargo hack --each-feature --exclude-features=default,full check + cargo check --example simple --no-default-features --features=json cargo run --example simple --features=core,json - cargo hack --each-feature --exclude-features=default,full check -p merde + + # can't use cargo-nextest because we want to run doctests cargo test -F full pushd zerodeps-example diff --git a/merde_time/src/lib.rs b/merde_time/src/lib.rs index d0f89e8..a1f4f6f 100644 --- a/merde_time/src/lib.rs +++ b/merde_time/src/lib.rs @@ -55,8 +55,6 @@ where #[cfg(feature = "merde")] mod merde_impls { - use merde_core::CowStr; - use super::*; impl merde_core::IntoStatic for Rfc3339 { @@ -73,7 +71,7 @@ mod merde_impls { where D: merde_core::Deserializer<'s> + ?Sized, { - let s = CowStr::deserialize(de).await?; + let s = merde_core::CowStr::deserialize(de).await?; Ok(Rfc3339( time::OffsetDateTime::parse( s.as_ref(),