add workflowdispatch #5
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: bindings/wasm | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 18 | |
| - name: Install wasmlpack | |
| run: cargo install wasm-pack | |
| - name: Test wasm binding | |
| run: | | |
| cd bindings/wasm | |
| cargo fetch | |
| cargo clippy --all-targets --no-deps -- -Dwarnings | |
| wasm-pack build --target nodejs --release | |
| # Enable when upstream issue is fixed. | |
| # https://github.com/microsoft/regorus/issues/371 | |
| # wasm-pack test --release --node | |
| node test.js |