Skip to content
New issue

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

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

Already on GitHub? # to your account

Fix: execute Wasm tests on node in CI #2205

Merged

Conversation

dlachaume
Copy link
Collaborator

@dlachaume dlachaume commented Jan 8, 2025

Content

This PR includes several updates to enable running Wasm tests in Node environments:

  • Adds a test-node feature to the mithril-client-wasm crate to skip code that isn't compatible with Node.
  • Upgrades the default Node version from 18 to 22 in the build-test-wasm step of the CI, ensuring wasm-pack test runs smoothly with node.
  • Closes the BroadcastChannel after usage in handle_event, preventing Wasm tests from hanging indefinitely with node.

Pre-submit checklist

  • Branch
    • Tests are provided (if possible)
    • Crates versions are updated (if relevant)
    • CHANGELOG file is updated (if relevant)
    • Commit sequence broadly makes sense
    • Key commits have useful messages
  • PR
    • No clippy warnings in the CI
    • Self-reviewed the diff
    • Useful pull request description
    • Reviewer requested
  • Documentation
    • Update README file (if relevant)
    • Update documentation website (if relevant)
    • Add dev blog post (if relevant)

Issue(s)

Closes #2138

@dlachaume dlachaume changed the title Fix: run client_wasm tests for nodejs in CI Fix: execute Wasm tests on node in CI Jan 8, 2025
@dlachaume dlachaume force-pushed the dlachaume/2138/client-wasm-tests-for-node-js-not-executed branch 2 times, most recently from 93d9e4f to 0b19b9b Compare January 8, 2025 15:13
Copy link

github-actions bot commented Jan 8, 2025

Test Results

    4 files  ±0     52 suites  ±0   10m 23s ⏱️ +4s
1 493 tests ±0  1 493 ✅ ±0  0 💤 ±0  0 ❌ ±0 
1 749 runs  ±0  1 749 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 10bf84d. ± Comparison against base commit ed1e290.

♻️ This comment has been updated with latest results.

@dlachaume dlachaume temporarily deployed to testing-sanchonet January 8, 2025 15:53 — with GitHub Actions Inactive
@dlachaume dlachaume temporarily deployed to testing-sanchonet January 8, 2025 16:28 — with GitHub Actions Inactive
@dlachaume dlachaume force-pushed the dlachaume/2138/client-wasm-tests-for-node-js-not-executed branch 2 times, most recently from a1cac48 to 75e0186 Compare January 8, 2025 17:07
@dlachaume dlachaume self-assigned this Jan 8, 2025
@dlachaume dlachaume temporarily deployed to testing-sanchonet January 8, 2025 17:25 — with GitHub Actions Inactive
@dlachaume dlachaume force-pushed the dlachaume/2138/client-wasm-tests-for-node-js-not-executed branch 2 times, most recently from 146334d to 840be27 Compare January 8, 2025 17:33
@dlachaume dlachaume temporarily deployed to testing-sanchonet January 8, 2025 17:52 — with GitHub Actions Inactive
@dlachaume dlachaume force-pushed the dlachaume/2138/client-wasm-tests-for-node-js-not-executed branch from 840be27 to 7bb6352 Compare January 8, 2025 17:53
@dlachaume dlachaume marked this pull request as ready for review January 8, 2025 17:55
@dlachaume dlachaume temporarily deployed to testing-sanchonet January 8, 2025 18:07 — with GitHub Actions Inactive
Copy link
Member

@jpraynaud jpraynaud left a comment

Choose a reason for hiding this comment

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

LGTM 👍

Prevent from executing `certificate_verification_cache.rs` tests that uses
the local storage, which is not supported with node.
Ensures that `wasm-pack test` runs without issue under Node.
@dlachaume dlachaume force-pushed the dlachaume/2138/client-wasm-tests-for-node-js-not-executed branch from 7bb6352 to cf390bd Compare January 9, 2025 10:11
* mithril-client-wasm from `0.7.4` to `0.7.5`
* [js] mithril-client-wasm from `0.7.4` to `0.7.5`
Copy link
Collaborator

@sfauvel sfauvel left a comment

Choose a reason for hiding this comment

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

LGTM

@dlachaume dlachaume merged commit 493c182 into main Jan 9, 2025
51 checks passed
@dlachaume dlachaume deleted the dlachaume/2138/client-wasm-tests-for-node-js-not-executed branch January 9, 2025 11:19
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Client WASM tests for NodeJS are not executed in the CI
4 participants