Skip to content

Commit

Permalink
add integration test feature flag, add integration test CI action
Browse files Browse the repository at this point in the history
  • Loading branch information
eureka-cpu committed Dec 11, 2024
1 parent 95d46d4 commit 6a53aab
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 4 deletions.
3 changes: 1 addition & 2 deletions .github/docker/Dockerfile.build
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,4 @@ RUN /go/bin/yamlfmt -lint .github/workflows/*.yaml .github/workflows/*.yml .gith

RUN cargo check
RUN cargo +nightly fmt --all -- --check
# Build the bonsol cli target prior to running integration tests that require it.
RUN cargo build --bin bonsol && cargo test
RUN cargo test
2 changes: 1 addition & 1 deletion .github/workflows/build-ci-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
- "*"
jobs:
build:
runs-on: ubuntu-latest-m
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Integration Tests
on:
pull_request:
branches:
- '**'

concurrency:
cancel-in-progress: true

permissions: read-all

jobs:
integration-tests:
name: Setup Toolchain and Test
runs-on: ubuntu-latest
permissions:
contents: "read"
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install Nix With Bonsol Binary Cache
uses: DeterminateSystems/nix-installer-action@main
with:
extra-conf: |
extra-substituters = https://bonsol.cachix.org
extra-trusted-public-keys = bonsol.cachix.org-1:yz7vi1rCPW1BpqoszdJvf08HZxQ/5gPTPxft4NnT74A=
- name: Run Integration Tests
run: nix develop --command cargo test --features integration -- --nocapture
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
### Changed
* `bonsol` cli option requirements and error messages updated for added clarity

### Added
* `bonsol estimate` for estimating execution cost of bonsol programs.

### Fixed
* **Breaking**: `execute_v1` interface instruction now uses the new `InputRef` to improve CU usage.
* Adds a callback struct to use the input_hash and committed_outputs from the callback program ergonomically.
Expand Down
1 change: 1 addition & 0 deletions cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ path = "src/main.rs"
[features]
mac = ["risc0-zkvm/metal"]
linux = ["risc0-zkvm/cuda"]
integration = []

[dependencies]
anyhow = "1.0.86"
Expand Down
2 changes: 1 addition & 1 deletion cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ mod execute;
mod init;
mod prove;

#[cfg(test)]
#[cfg(all(test, feature = "integration"))]
mod tests;

pub mod command;
Expand Down

0 comments on commit 6a53aab

Please sign in to comment.