P2P - Part 4 #2539
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
| on: [pull_request] | |
| name: Basic Checks | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| CARGO_INCREMENTAL: 0 | |
| RUST_BACKTRACE: short | |
| CARGO_TERM_COLOR: always | |
| WAVS_SUBMISSION_MNEMONIC: "test test test test test test test test test test test junk" | |
| WAVS_CLI_EVM_CREDENTIAL: "test test test test test test test test test test test junk" | |
| WAVS_AGGREGATOR_CREDENTIAL: "test test test test test test test test test test test junk" | |
| WAVS_COSMOS_SUBMISSION_MNEMONIC: "reward index time stem expire cheap worth fence coil option treat ensure install entry zone mule benefit success remain rebuild inherit eyebrow cluster sheriff" | |
| WAVS_CLI_COSMOS_MNEMONIC: "reward index time stem expire cheap worth fence coil option treat ensure install entry zone mule benefit success remain rebuild inherit eyebrow cluster sheriff" | |
| jobs: | |
| test-eigenlayer: | |
| name: Test Suite (EigenLayer) | |
| runs-on: blacksmith-4vcpu-ubuntu-2404 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: 1.90.0 | |
| - name: Cache dependencies | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| cache-on-failure: true | |
| - name: Install Foundry | |
| uses: foundry-rs/foundry-toolchain@v1 | |
| - name: Configure EigenLayer middleware | |
| run: | | |
| sed -i 's/middleware_type = ".*"/middleware_type = "eigenlayer"/' packages/layer-tests/layer-tests.toml | |
| - name: Build tests first | |
| run: cargo test --workspace --no-run --locked | |
| - name: Run tests | |
| run: cargo test --workspace --locked --all-features -- --nocapture --test-threads=4 | |
| env: | |
| RUST_LOG: info | |
| test-poa: | |
| name: Test Suite (POA) | |
| runs-on: blacksmith-4vcpu-ubuntu-2404 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: 1.90.0 | |
| - name: Cache dependencies | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| cache-on-failure: true | |
| - name: Install Foundry | |
| uses: foundry-rs/foundry-toolchain@v1 | |
| - name: Configure POA middleware | |
| run: | | |
| sed -i 's/middleware_type = ".*"/middleware_type = "poa"/' packages/layer-tests/layer-tests.toml | |
| sed -i 's/middleware_concurrency = .*/middleware_concurrency = true/' packages/layer-tests/layer-tests.toml | |
| - name: Build tests first | |
| run: cargo test --workspace --no-run --locked | |
| - name: Run tests | |
| run: cargo test --workspace --locked --all-features -- --nocapture --test-threads=4 | |
| env: | |
| RUST_LOG: info | |
| test-suite: | |
| name: Test Suite | |
| runs-on: ubuntu-latest | |
| needs: [test-eigenlayer, test-poa] | |
| if: always() | |
| steps: | |
| - name: Check test results | |
| run: | | |
| if [ "${{ needs.test-eigenlayer.result }}" != "success" ] || [ "${{ needs.test-poa.result }}" != "success" ]; then | |
| echo "One or more test jobs failed" | |
| exit 1 | |
| fi | |
| echo "All test jobs passed" | |
| lint: | |
| name: Lint | |
| runs-on: blacksmith-4vcpu-ubuntu-2404 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: 1.90.0 | |
| components: rustfmt, clippy | |
| - name: Cache dependencies | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| cache-on-failure: true | |
| - name: Check formatting | |
| run: cargo fmt --all -- --check | |
| - name: Run clippy | |
| run: cargo clippy --all-targets --all-features -- -D warnings |