diff --git a/.github/workflows/smoke.yml b/.github/workflows/smoke.yml index 7454c26cc0..37d13d09af 100644 --- a/.github/workflows/smoke.yml +++ b/.github/workflows/smoke.yml @@ -5,12 +5,13 @@ on: paths-ignore: - 'docs/**' +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: smoke_test: runs-on: buildjet-16vcpu-ubuntu-2204 - concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true environment: smoke-test steps: - uses: actions/checkout@v4 @@ -39,3 +40,30 @@ jobs: - name: Display smoke-test logs if: always() run: cat deployments/logs/smoke-*.log + + pmonitor-integration: + runs-on: buildjet-16vcpu-ubuntu-2204 + steps: + - uses: actions/checkout@v4 + with: + lfs: true + + - name: install nix + uses: nixbuild/nix-quick-install-action@v28 + + - name: setup nix cache + uses: nix-community/cache-nix-action@v5 + with: + primary-key: nix-${{ runner.os }}-${{ hashFiles('**/*.nix') }} + restore-prefixes-first-match: nix-${{ runner.os }}- + backend: buildjet + + - name: Load rust cache + uses: astriaorg/buildjet-rust-cache@v2.5.1 + + # Confirm that the nix devshell is buildable and runs at all. + - name: validate nix env + run: nix develop --command echo hello + + - name: run the pmonitor integration tests + run: nix develop --command just test-pmonitor diff --git a/crates/bin/pmonitor/Cargo.toml b/crates/bin/pmonitor/Cargo.toml index 6d1fe75c8f..71612426ba 100644 --- a/crates/bin/pmonitor/Cargo.toml +++ b/crates/bin/pmonitor/Cargo.toml @@ -18,7 +18,7 @@ colored = "2.1.0" directories = {workspace = true} futures = {workspace = true} indicatif = {workspace = true} -pcli = { path = "../pcli" } +pcli = {path = "../pcli", default-features = true} penumbra-app = {workspace = true} penumbra-asset = {workspace = true, default-features = false} penumbra-compact-block = {workspace = true, default-features = false} diff --git a/crates/bin/pmonitor/tests/common/mod.rs b/crates/bin/pmonitor/tests/common/mod.rs index 7e8b339683..a1465ee712 100644 --- a/crates/bin/pmonitor/tests/common/mod.rs +++ b/crates/bin/pmonitor/tests/common/mod.rs @@ -325,6 +325,7 @@ impl PmonitorTestRunner { .spawn() .expect("failed to execute devnet start cmd"); // Sleep a bit, to let network start + // TODO: use process-compose API to check for "Running" status on pd. std::thread::sleep(Duration::from_secs(8)); Ok(child) } diff --git a/justfile b/justfile index 4ecc0e9d79..d71bdb3abf 100644 --- a/justfile +++ b/justfile @@ -4,11 +4,12 @@ default: # Run integration tests for pmonitor tool test-pmonitor: - # warm cache - cargo build --release --bin pd - cargo run --release --bin pd -- network unsafe-reset-all || true + # prebuild cargo binaries required for integration tests + cargo -q build --bin pcli --bin pd --bin pmonitor + cargo -q run --release --bin pd -- network unsafe-reset-all rm -rf /tmp/pmonitor-integration-test cargo nextest run -p pmonitor --run-ignored=ignored-only --test-threads 1 + # cargo test -p pmonitor -- --ignored --test-threads 1 --nocapture # Creates and runs a local devnet with solo validator. Includes ancillary services # like metrics, postgres for storing ABCI events, and pindexer for munging those events.