Skip to content

Commit

Permalink
Run benches once during tests, don't just build them
Browse files Browse the repository at this point in the history
  • Loading branch information
ttiurani committed Oct 5, 2023
1 parent e8024d1 commit 68ef0e0
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ jobs:
cargo test --no-default-features --features js_interop_tests,async-std
cargo test --no-default-features --features js_interop_tests,async-std,sparse
cargo test --no-default-features --features js_interop_tests,async-std,sparse,cache
cargo test --benches --no-default-features --features tokio
cargo test --benches --no-default-features --features async-std
test-windows:
runs-on: windows-latest
Expand All @@ -67,6 +69,8 @@ jobs:
cargo test --no-default-features --features async-std
cargo test --no-default-features --features async-std,sparse
cargo test --no-default-features --features async-std,sparse,cache
cargo test --benches --no-default-features --features tokio
cargo test --benches --no-default-features --features async-std
test-macos:
runs-on: macos-latest
Expand All @@ -90,6 +94,8 @@ jobs:
cargo test --no-default-features --features js_interop_tests,async-std
cargo test --no-default-features --features js_interop_tests,async-std,sparse
cargo test --no-default-features --features js_interop_tests,async-std,sparse,cache
cargo test --benches --no-default-features --features tokio
cargo test --benches --no-default-features --features async-std
build-extra:
runs-on: ubuntu-latest
Expand All @@ -103,10 +109,6 @@ jobs:
run: |
cargo build --target=wasm32-unknown-unknown --no-default-features --features tokio
cargo build --target=wasm32-unknown-unknown --no-default-features --features async-std
- name: Build benches
run: |
cargo build --benches --no-default-features --features tokio
cargo build --benches --no-default-features --features async-std
- name: Build release
run: |
cargo build --release --no-default-features --features tokio
Expand Down
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,20 @@ cargo add hypercore
This crate uses ``#![forbid(unsafe_code)]`` to ensure everythong is implemented in
100% Safe Rust.

## Development

To test interoperability with Javascript, enable the `js_interop_tests` feature:

```bash
cargo test --features js_interop_tests
```

Run benches with:

```bash
cargo bench
```

## Contributing

Want to join us? Check out our ["Contributing" guide][contributing] and take a
Expand Down

0 comments on commit 68ef0e0

Please sign in to comment.