Skip to content

Commit

Permalink
ci: add integration tests for pmonitor
Browse files Browse the repository at this point in the history
Adds automated testing of common use cases for the `pmonitor` FVK
audit tool. The cargo tests are adapted from a one-off bash script
written to aid in review of the original pmonitor PR.

ci: add pmonitor integration workflow

ci: adjust smoke concurrency

ci: load rust cache
  • Loading branch information
conorsch committed Oct 11, 2024
1 parent 785ecdd commit 0ec64df
Show file tree
Hide file tree
Showing 8 changed files with 801 additions and 4 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
3 changes: 3 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 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 All @@ -39,3 +39,8 @@ tracing = {workspace = true}
tracing-subscriber = { workspace = true, features = ["env-filter", "ansi"] }
url = {workspace = true, features = ["serde"]}
uuid = { version = "1.3", features = ["v4", "serde"] }

[dev-dependencies]
assert_cmd = {workspace = true}
once_cell = {workspace = true}
tempfile = {workspace = true}
Loading

0 comments on commit 0ec64df

Please sign in to comment.