feat: create P2PHandle to improve p2p service interactions #1495
Workflow file for this run
This file contains hidden or 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: Check Format & Lint | |
| on: | |
| pull_request: | |
| branches: [ main, master, develop ] | |
| paths: | |
| - '**/*.rs' | |
| - '**/Cargo.*' | |
| push: | |
| branches: [ main, master, develop ] | |
| paths: | |
| - '**/*.rs' | |
| - '**/Cargo.*' | |
| env: | |
| CARGO_TERM_COLOR: always | |
| CARGO_INCREMENTAL: 0 | |
| RUSTFLAGS: "-C debuginfo=0 --cfg tokio_unstable" | |
| LANG: C.UTF-8 | |
| LC_ALL: C.UTF-8 | |
| jobs: | |
| check: | |
| name: Format & Lint | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: 1.83.0 | |
| components: rustfmt, clippy | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| cache-directories: "**/target" | |
| cache-on-failure: true | |
| - name: Run format check | |
| run: cargo fmt -- --check | |
| - name: Run clippy | |
| if: success() || failure() | |
| run: cargo clippy -- -D warnings | |
| - name: Install Foundry | |
| uses: foundry-rs/foundry-toolchain@v1 | |
| with: | |
| version: v1.1.0 | |
| - name: Install Redis binary | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y redis-server | |
| # Ensure redis-server binary is installed but don't start the service | |
| sudo systemctl stop redis || true | |
| sudo systemctl disable redis || true | |
| - name: Run tests | |
| if: success() || failure() | |
| run: | | |
| redis-server --version | |
| RUST_BACKTRACE=1 cargo test -- --nocapture |