-
-
Notifications
You must be signed in to change notification settings - Fork 4
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
Add WASM testing #313
base: main
Are you sure you want to change the base?
Add WASM testing #313
Conversation
🦋 Changeset detectedLatest commit: 1e8c058 The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
WalkthroughThis update enhances the "web-csv-toolbox" project by introducing WebAssembly (WASM) testing capabilities and refining the GitHub Actions workflow. New tests for CSV parsing functionality ensure robust performance across environments, while modifications to configuration files improve project structure and module compatibility. The changes collectively elevate the project's efficiency and testing coverage. Changes
Sequence Diagram(s)sequenceDiagram
participant A as Developer
participant B as GitHub Actions
participant C as Test Suite
participant D as WebAssembly Module
A->>B: Trigger CI/CD
B->>C: Run tests (including WASM)
C->>D: Execute `parse_string_to_array_sync`
D-->>C: Return parsed data
C-->>B: Report test results
B-->>A: Notify build status
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
Bundle ReportBundle size has no change ✅ |
CodSpeed Performance ReportMerging #313 will improve performances by ×2Comparing Summary
Benchmarks breakdown
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (1)
web-csv-toolbox-wasm/Cargo.lock
is excluded by!**/*.lock
Files selected for processing (7)
- .changeset/modern-rice-own.md (1 hunks)
- .github/actions/setup/action.yaml (1 hunks)
- .github/workflows/.dynamic-tests.yaml (4 hunks)
- web-csv-toolbox-wasm/Cargo.toml (2 hunks)
- web-csv-toolbox-wasm/package.json (1 hunks)
- web-csv-toolbox-wasm/tests/node.rs (1 hunks)
- web-csv-toolbox-wasm/tests/web.rs (1 hunks)
Files skipped from review due to trivial changes (1)
- web-csv-toolbox-wasm/package.json
Additional comments not posted (10)
.changeset/modern-rice-own.md (1)
1-5
: Changeset looks good.The changeset correctly documents the patch release for adding WASM testing.
web-csv-toolbox-wasm/tests/node.rs (1)
1-15
: WASM test implementation looks good.The test correctly validates the
parse_string_to_array_sync
function usingwasm_bindgen_test
.web-csv-toolbox-wasm/tests/web.rs (1)
1-17
: WASM browser test implementation looks good.The test correctly validates the
parse_string_to_array_sync
function usingwasm_bindgen_test
configured for browser execution.web-csv-toolbox-wasm/Cargo.toml (2)
11-11
: Enhancement: Addedrlib
tocrate-type
.Adding
rlib
allows the library to be used as a static library, increasing its flexibility in different Rust contexts. This change is beneficial for broader compatibility.
26-27
: Addition: Introducedwasm-bindgen-test
indev-dependencies
.The inclusion of
wasm-bindgen-test
facilitates testing WebAssembly components, aligning with the PR's objective to enhance testing capabilities..github/actions/setup/action.yaml (1)
35-35
: Optimization: Restrict C++ setup to Linux.Limiting the C++ setup step to Linux environments optimizes the workflow by preventing unnecessary installations on non-Linux systems.
.github/workflows/.dynamic-tests.yaml (4)
61-74
: Addition: Newtest_wasm_nodejs
job.The new job adds WebAssembly testing in Node.js environments, supporting multiple Node.js versions. This enhances the testing coverage and ensures compatibility across different Node.js versions.
110-111
: Update: Addedworking-directory
for Linux browser tests.Specifying the
working-directory
ensures that tests are executed in the correct context, improving the reliability of the test execution.
134-135
: Update: Addedworking-directory
for macOS browser tests.This change aligns with the updates for other platforms, ensuring consistency in the test execution environment.
153-155
: Conditional Execution: Exclude Edge from WASM tests on Windows.The conditional logic to skip WASM tests for Edge ensures compatibility and avoids potential issues specific to the Edge browser.
This pull request adds WASM testing to the project. The changes include the addition of test cases for parsing a string to an array synchronously in a WASM environment. These tests ensure the correct functionality of the parsing logic.
Summary by CodeRabbit
New Features
package.json
file to support CommonJS module compatibility.Bug Fixes
Tests
Chores