Skip to content

Commit

Permalink
ci: add pmonitor integration workflow
Browse files Browse the repository at this point in the history
ci: adjust smoke concurrency

ci: load rust cache
  • Loading branch information
conorsch committed Oct 10, 2024
1 parent ad2f0c9 commit 2158ad7
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 7 deletions.
34 changes: 31 additions & 3 deletions .github/workflows/smoke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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/[email protected]

# 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
2 changes: 1 addition & 1 deletion crates/bin/pmonitor/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
1 change: 1 addition & 0 deletions crates/bin/pmonitor/tests/common/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
7 changes: 4 additions & 3 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 2158ad7

Please sign in to comment.