Build wasm package #5
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: Build and test context-js | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- "*" | |
pull_request: {} | |
workflow_dispatch: {} | |
permissions: | |
contents: read | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@nightly | |
with: | |
targets: wasm32-unknown-unknown | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20.x | |
- name: Install pnpm | |
uses: trunk-io/trunk-action/install@v1 | |
with: | |
tools: pnpm | |
- name: Install dependencies | |
run: pnpm install --dir ./context-js | |
- name: Build wasm package | |
run: pnpm run --dir ./context-js build | |
- name: Upload wasm package | |
uses: actions/upload-artifact@v4 | |
with: | |
name: context-js-pkg | |
path: ./context-js/pkg | |
- name: Test wasm package | |
run: pnpm run --dir ./context-js test |