Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Also run tests on macOS #99

Merged
merged 2 commits into from
Oct 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 8 additions & 24 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
7 changes: 6 additions & 1 deletion Justfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 1 addition & 3 deletions merde_time/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,6 @@ where

#[cfg(feature = "merde")]
mod merde_impls {
use merde_core::CowStr;

use super::*;

impl merde_core::IntoStatic for Rfc3339<OffsetDateTime> {
Expand All @@ -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(),
Expand Down