Data further refactor #1
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: Local Tests | |
on: | |
push: | |
branches: [ main, develop ] | |
pull_request: | |
branches: [ main, develop ] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
test: | |
name: Run Local Tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Rust | |
uses: dtolnay/rust-toolchain@stable | |
- name: Cache Dependencies | |
uses: Swatinem/rust-cache@v2 | |
- name: Install Foundry | |
uses: foundry-rs/foundry-toolchain@v1 | |
- name: Build ant-node with local feature | |
run: cargo build -p ant-node --features local | |
- name: Build evm-testnet | |
run: cargo build -p evm-testnet | |
- name: Run Local Tests | |
run: | | |
# Kill any existing antnode processes | |
pkill -f "antnode" || true | |
# Check if port 4343 is in use | |
if ! nc -z localhost 4343; then | |
# Start EVM testnet | |
RPC_PORT=4343 ./target/debug/evm-testnet --genesis-wallet 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 & | |
EVM_PID=$! | |
# Wait for EVM testnet to be ready | |
sleep 5 | |
else | |
echo "Port 4343 is already in use, assuming EVM network is running..." | |
fi | |
# Run tests with test feature | |
RUST_LOG=trace cargo test -p autonomi --features test -- --nocapture | |
# Cleanup | |
kill $EVM_PID || true | |
pkill -f "antnode" || true |