chore: add new validation rules #52
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: JS Binding Tests | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: wasm32-unknown-unknown | |
| - name: Cache Rust build artifacts | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| cache-targets: "wasm32-unknown-unknown" | |
| - name: Install wasm-pack | |
| run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh | |
| - name: Install Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22.13.0' | |
| - name: Build WASM package | |
| run: | | |
| # Change to the js directory and run build wasm | |
| cd ./pkg | |
| npm run build | |
| - name: Run JS tests | |
| run: | | |
| cd ./pkg | |
| npm install | |
| echo "Running JavaScript tests..." | |
| npm run test | |
| echo "All tests completed successfully!" |