Skip to content

Commit

Permalink
feat: add github test ci
Browse files Browse the repository at this point in the history
  • Loading branch information
dsgallups committed Nov 3, 2024
1 parent ad770d7 commit 76ecea5
Show file tree
Hide file tree
Showing 5 changed files with 246 additions and 12 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Test

on:
pull_request: {}

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- uses: Swatinem/rust-cache@v2
- run: cargo fmt --all -- --check
- run: cargo clippy --all-targets --all-features -- -D warnings

test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- run: wasm-pack test --chrome
220 changes: 210 additions & 10 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,9 @@ tracing-subscriber = { version = "0.3", features = [
], default-features = false }
wasm-bindgen = { version = "0.2" }


[dev-dependencies]
wasm-bindgen-test = "0.3.0"

[features]
mark-with-rayon-thread-index = ["rayon"]
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ Leverage performance profiling with your browser tools with the [tracing crate](

[crates-badge]: https://img.shields.io/crates/v/wasm-tracing.svg
[crates-url]: https://crates.io/crates/wasm-tracing
[docs-badge]: https://docs.rs/tracing-wasm/badge.svg
[docs-url]: https://docs.rs/tracing-wasm
[docs-badge]: https://docs.rs/wasm-tracing/badge.svg
[docs-url]: https://docs.rs/wasm-tracing
[mit-badge]: https://img.shields.io/badge/license-MIT-blue.svg
[mit-url]: LICENSE-MIT
[apache-2-badge]: https://img.shields.io/badge/license-APACHE%202.0-blue.svg
Expand Down
6 changes: 6 additions & 0 deletions tests/wasm.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
use wasm_bindgen_test::*;
use wasm_tracing::prelude::*;
#[wasm_bindgen_test]
pub fn test() {
wasm_tracing::set_as_global_default();
}

0 comments on commit 76ecea5

Please sign in to comment.