-
Notifications
You must be signed in to change notification settings - Fork 6
test(mbt): Add Model Based Test for Emerald #201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,6 +8,7 @@ on: | |
|
|
||
| permissions: | ||
| contents: read | ||
| packages: read | ||
|
|
||
| # If new code is pushed to a PR branch, then cancel in progress workflows for that PR. | ||
| # Ensures that we don't waste CI time, and returns results quicker. | ||
|
|
@@ -20,7 +21,7 @@ env: | |
| CARGO_TERM_COLOR: always | ||
| CARGO_PROFILE_DEV_DEBUG: 1 | ||
| CARGO_PROFILE_RELEASE_DEBUG: 1 | ||
| RUST_BACKTRACE: short | ||
| RUST_BACKTRACE: full | ||
| CARGO_NET_RETRY: 10 | ||
| RUSTUP_MAX_RETRIES: 10 | ||
|
|
||
|
|
@@ -57,11 +58,64 @@ jobs: | |
| - name: Run Forge build | ||
| run: forge build | ||
| if: steps.filter.outputs.code == 'true' | ||
| - name: Run tests | ||
| - name: Run unit tests | ||
| run: | | ||
| cargo nextest run \ | ||
| --workspace \ | ||
| --all-features \ | ||
| --no-fail-fast \ | ||
| --failure-output final | ||
| --failure-output final \ | ||
| --filterset 'not package(emerald-mbt)' | ||
| if: steps.filter.outputs.code == 'true' | ||
|
|
||
| mbt: | ||
| name: MBT Suite | ||
| runs-on: ubuntu-latest | ||
| # XXX: Do not block on MBT initially until we gain confidence CI is not | ||
| # flaky for any reason. | ||
| continue-on-error: true | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v5 | ||
| with: | ||
| submodules: recursive | ||
| - id: filter | ||
| uses: dorny/paths-filter@v3 | ||
| with: | ||
| filters: | | ||
| code: | ||
| - '**/*.rs' | ||
| - '**/*.qnt' | ||
| - 'Makefile' | ||
| - '**/Cargo.toml' | ||
| - '**/Cargo.lock' | ||
| - '**/*.sh' | ||
| - '*/workflows/test.yml' | ||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '22' | ||
| - name: Install Quint | ||
| run: npm install -g @informalsystems/quint | ||
|
Comment on lines
+94
to
+99
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can we use |
||
| - name: Login to GitHub Container Registry | ||
| uses: docker/login-action@v3 | ||
| with: | ||
| registry: ghcr.io | ||
| username: ${{ github.actor }} | ||
| password: ${{ secrets.GITHUB_TOKEN }} | ||
| - name: Install Protoc | ||
| uses: arduino/setup-protoc@v3 | ||
| with: | ||
| repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
| - name: Setup Rust toolchain | ||
| uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
| with: | ||
| toolchain: nightly | ||
| - name: Install Foundry | ||
| uses: foundry-rs/foundry-toolchain@v1 | ||
| - name: Run Forge build | ||
| run: forge build | ||
| if: steps.filter.outputs.code == 'true' | ||
|
Comment on lines
+116
to
+118
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| - name: Run MBT suite | ||
| run: make mbt-test | ||
| if: steps.filter.outputs.code == 'true' | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,6 +7,7 @@ members = [ | |
| "engine", | ||
| "utils", | ||
| "types", | ||
| "tests/mbt", | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can you use |
||
| ] | ||
|
|
||
| [workspace.package] | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| [package] | ||
| name = "emerald-mbt" | ||
| version = { workspace = true } | ||
| edition = { workspace = true } | ||
| publish = false | ||
|
|
||
| [lints] | ||
| workspace = true | ||
|
|
||
| [dependencies] | ||
| emerald = { workspace = true } | ||
| malachitebft-eth-types = { workspace = true } | ||
| malachitebft-eth-engine = { workspace = true } | ||
| malachitebft-eth-cli = { workspace = true } | ||
| malachitebft-app-channel = { workspace = true } | ||
| malachitebft-core-consensus = { workspace = true } | ||
|
|
||
| serde = { workspace = true } | ||
| itf = { workspace = true } | ||
| tokio = { workspace = true } | ||
|
|
||
| quint-connect = "0.1" | ||
| anyhow = "1.0" | ||
| bimap = "0.6.3" | ||
| tempfile = "3.23.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you also add a timeout here ?