forked from payjoin/rust-payjoin
-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (42 loc) · 1.3 KB
/
javascript.yml
File metadata and controls
51 lines (42 loc) · 1.3 KB
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
name: Build and Test JavaScript
on:
pull_request:
paths:
- payjoin-ffi/**
env:
# Override the value from the rust-toolchain file
# This is necessary because even though the correct toolchain
# is explicitly specified for the rust-toolchain action,
# rustup honors the rust-toolchain file over the default
RUSTUP_TOOLCHAIN: 1.85
jobs:
build-js-and-test:
name: "Build and test javascript"
runs-on: ${{ matrix.os }}
defaults:
run:
working-directory: payjoin-ffi/javascript
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Rust 1.85.0
uses: dtolnay/rust-toolchain@1.85.0
- name: "Use cache"
uses: Swatinem/rust-cache@v2
- name: Install Node
uses: actions/setup-node@v6
- name: Install llvm
if: matrix.os == 'macos-latest'
run: brew install llvm
# 0.2.109+ requires rustc 1.88 (via time crate).
- name: Install wasm-bindgen
run: cargo install --locked wasm-bindgen-cli --version 0.2.108
- name: "Install dependencies"
run: npm ci
- name: Generate bindings and binaries
run: bash ./scripts/generate_bindings.sh
- name: Run tests
run: npm test