Skip to content

Commit

Permalink
Fix cargo test (#2199)
Browse files Browse the repository at this point in the history
* Run `cargo test` on CI

* Fix compilation of `cargo test`
  • Loading branch information
emilk committed May 24, 2023
1 parent 1606471 commit 7b686de
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 18 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/reusable_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,14 @@ jobs:
command: doc
args: --document-private-items --no-deps --all-features

- name: Test
# Just a normal `cargo test` should always work:
- name: cargo test --all-targets
uses: actions-rs/cargo@v1
with:
command: test

# Full test of everything:
- name: cargo test --all-targets --all-features
uses: actions-rs/cargo@v1
with:
command: test
Expand Down
40 changes: 23 additions & 17 deletions crates/re_arrow_store/tests/dump.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,17 +79,20 @@ fn data_store_dump_impl(store1: &mut DataStore, store2: &mut DataStore, store3:
}
sanity_unwrap(store3);

let store1_df = store1.to_dataframe();
let store2_df = store2.to_dataframe();
let store3_df = store3.to_dataframe();
assert!(
store1_df == store2_df,
"First & second stores differ:\n{store1_df}\n{store2_df}"
);
assert!(
store1_df == store3_df,
"First & third stores differ:\n{store1_df}\n{store3_df}"
);
#[cfg(feature = "polars")]
{
let store1_df = store1.to_dataframe();
let store2_df = store2.to_dataframe();
let store3_df = store3.to_dataframe();
assert!(
store1_df == store2_df,
"First & second stores differ:\n{store1_df}\n{store2_df}"
);
assert!(
store1_df == store3_df,
"First & third stores differ:\n{store1_df}\n{store3_df}"
);
}

let store1_stats = DataStoreStats::from_store(store1);
let store2_stats = DataStoreStats::from_store(store2);
Expand Down Expand Up @@ -173,12 +176,15 @@ fn data_store_dump_filtered_impl(store1: &mut DataStore, store2: &mut DataStore)
}
sanity_unwrap(store2);

let store1_df = store1.to_dataframe();
let store2_df = store2.to_dataframe();
assert!(
store1_df == store2_df,
"First & second stores differ:\n{store1_df}\n{store2_df}"
);
#[cfg(feature = "polars")]
{
let store1_df = store1.to_dataframe();
let store2_df = store2.to_dataframe();
assert!(
store1_df == store2_df,
"First & second stores differ:\n{store1_df}\n{store2_df}"
);
}

let store1_stats = DataStoreStats::from_store(store1);
let store2_stats = DataStoreStats::from_store(store2);
Expand Down

1 comment on commit 7b686de

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'Rust Benchmark'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.25.

Benchmark suite Current: 7b686de Previous: 043b7a3 Ratio
datastore/num_rows=1000/num_instances=1000/packed=false/insert/default 3662130 ns/iter (± 145404) 2796305 ns/iter (± 19590) 1.31
mono_points_arrow_batched/generate_message_bundles 26474440 ns/iter (± 1125399) 19151848 ns/iter (± 774644) 1.38
mono_points_arrow_batched/generate_messages 5281224 ns/iter (± 374776) 4213168 ns/iter (± 65352) 1.25
mono_points_arrow_batched/encode_total 32220313 ns/iter (± 780439) 25724672 ns/iter (± 1132204) 1.25

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.