V3 #12
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |