-
Notifications
You must be signed in to change notification settings - Fork 5
54 lines (43 loc) · 1.22 KB
/
wasm-test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
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: Setup Node 16.x
uses: actions/setup-node@v3
with:
node-version: '16.x'
- name: install wasm-pack
run: cargo install --version 0.11.1 wasm-pack
- name: wasm-pack build and pack
run: cd wasm && wasm-pack build --release --target=nodejs
- name: yarn install
run: cd wasm/tests && yarn install
- name: wasm tests
run: cd wasm/tests && yarn test