Skip to content

Commit

Permalink
Revert "chore: remove wasm-pack ci workflow"
Browse files Browse the repository at this point in the history
This reverts commit e5fb1d9.
  • Loading branch information
Nuhvi committed Feb 21, 2025
1 parent 0535609 commit 817d864
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/wasm.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
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

0 comments on commit 817d864

Please sign in to comment.