Skip to content

Commit 338aace

Browse files
authored
Use contrib/test.sh in all language bindings (#1416)
2 parents 3c5a384 + 770947e commit 338aace

5 files changed

Lines changed: 29 additions & 27 deletions

File tree

.github/workflows/dart.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,5 @@ jobs:
3535
- name: "Use cache"
3636
uses: Swatinem/rust-cache@v2
3737

38-
- name: Generate bindings and binaries
39-
run: bash ./scripts/generate_bindings.sh
40-
41-
- name: Run tests
42-
run: dart test
38+
- name: "Build and test"
39+
run: bash ./contrib/test.sh

.github/workflows/javascript.yml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,5 @@ jobs:
4141
- name: Install wasm-bindgen
4242
run: cargo install --locked wasm-bindgen-cli --version 0.2.108
4343

44-
- name: "Install dependencies"
45-
run: npm ci
46-
47-
- name: Generate bindings and binaries
48-
run: bash ./scripts/generate_bindings.sh
49-
50-
- name: Run tests
51-
run: npm test
44+
- name: "Build and test"
45+
run: bash ./contrib/test.sh

.github/workflows/python.yml

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -41,17 +41,5 @@ jobs:
4141
version: "0.8.2"
4242
enable-cache: true
4343

44-
- name: "uv sync"
45-
run: uv sync --all-extras
46-
47-
- name: "Generate payjoin-ffi.py and binaries"
48-
run: bash ./scripts/generate_bindings.sh
49-
50-
- name: "Build wheel"
51-
run: uv build --wheel
52-
53-
- name: "Install wheel"
54-
run: uv run pip install ./dist/*.whl
55-
56-
- name: "Run tests"
57-
run: uv run python -m unittest --verbose
44+
- name: "Build and test"
45+
run: bash ./contrib/test.sh

payjoin-ffi/dart/contrib/test.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
4+
cd "$(dirname "$0")/.."
5+
6+
echo "==> Generating FFI bindings..."
7+
bash ./scripts/generate_bindings.sh
8+
9+
echo "==> Running dart tests..."
10+
dart test
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
4+
cd "$(dirname "$0")/.."
5+
6+
echo "==> Installing JavaScript dependencies..."
7+
npm ci
8+
9+
echo "==> Generating FFI bindings..."
10+
bash ./scripts/generate_bindings.sh
11+
12+
echo "==> Running JavaScript tests..."
13+
npm test

0 commit comments

Comments
 (0)