feat: add github actions workflow for tests #2
Workflow file for this run
This file contains 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: Tests | |
on: [push, pull_request] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: stable | |
targets: wasm32-unknown-unknown | |
- run: cargo test | |
- name: Install wasm-pack | |
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh | |
- run: wasm-pack build --release --target nodejs --out-name index --out-dir out -- --no-default-features -F wasm | |
- uses: oven-sh/setup-bun@v1 | |
with: | |
bun-version: latest | |
- run: bun install | |
- run: bun node_modules/mocha/bin/mocha.js tests/test.js --bail --exit |