Add browser support via conditional exports #127
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: CI | |
on: | |
push: | |
branches: | |
- main | |
- master | |
pull_request: {} | |
concurrency: | |
group: ci-${{ github.head_ref || github.ref }} | |
cancel-in-progress: true | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Cache Crates | |
uses: actions/cache@v3 | |
with: | |
path: | | |
./target | |
~/.cargo | |
key: debug-${{ runner.os }}-${{ hashFiles('rust-toolchain') }}-${{ hashFiles('Cargo.lock') }} | |
restore-keys: | | |
debug-${{ runner.os }}-${{ hashFiles('rust-toolchain') }}- | |
debug-${{ runner.os }}- | |
- name: Run tests | |
run: cargo test --verbose | |
- name: Install wasm-pack | |
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh | |
- uses: pnpm/action-setup@v2 | |
with: | |
version: 8 | |
- name: Install wasm-opt | |
run: cargo install wasm-opt | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
cache: 'pnpm' | |
- run: ./build.sh | |
- run: pnpm test | |
- run: pnpm lint |