Start of wasm build #7
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: npm publish | |
on: | |
push: | |
branches: | |
- base | |
release: | |
types: [published] | |
pull_request: | |
branches: | |
- '**' | |
concurrency: | |
# SHA is added to the end if on `main` to let all main workflows run | |
group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}-${{ (github.ref == 'refs/heads/main') && github.sha || '' }} | |
cancel-in-progress: true | |
jobs: | |
build_npm: | |
name: Npm | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set Env | |
uses: Chia-Network/actions/setjobenv@main | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Set up rusts | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
components: rustfmt, clippy | |
- name: install wasm-pack | |
run: cargo install --version 0.11.1 wasm-pack | |
- name: wasm-pack build and pack | |
run: wasm-pack build --release --target=nodejs wasm && wasm-pack pack wasm | |
- name: Setup Node 16.x | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '16.x' | |
- name: yarn install | |
run: cd wasm/tests && yarn install | |
- name: wasm tests | |
run: cd wasm/tests && yarn test |