Skip to content

V3

V3 #12

Workflow file for this run

name: WASM Tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-unknown-unknown
- name: Install wasm-pack
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- name: Build server
run: cargo build
- name: Start server and run tests
run: |
# Start the server binary in the background
./target/debug/pkarr-relay --testnet &
SERVER_PID=$!
# Change the working directory to pkarr crate
cd ./pkarr
# Run wasm-pack tests
wasm-pack test --headless --firefox --lib
# Kill the server
kill $SERVER_PID