-
Notifications
You must be signed in to change notification settings - Fork 41
Run unit tests in CI as a separate job #1562
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
Changes from all commits
a87a9c5
3380d55
e1f6d7b
006fe09
e67a29c
8d5a5a8
7d4fe70
00a1f7d
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 |
|---|---|---|
|
|
@@ -265,6 +265,61 @@ jobs: | |
| path: target/release/mina | ||
| retention-days: 7 | ||
|
|
||
| unit-tests: | ||
| runs-on: ubuntu-24.04 | ||
| steps: | ||
| - name: Git checkout | ||
| uses: actions/checkout@v5 | ||
|
|
||
| - name: Load versions | ||
| uses: ./.github/actions/load-versions | ||
|
|
||
| - name: Setup build dependencies | ||
| uses: ./.github/actions/setup-build-deps | ||
|
|
||
| - name: Setup Rust | ||
| uses: ./.github/actions/setup-rust | ||
| with: | ||
| toolchain: ${{ env.RUST_STABLE_VERSION }} | ||
| cache-prefix: unit-tests-${{ env.CACHE_VERSION }} | ||
|
|
||
| - name: Install cargo-nextest | ||
| uses: taiki-e/install-action@nextest | ||
|
|
||
| # TODO: add this to the makefile | ||
| - name: Run unit tests | ||
| run: | | ||
| cargo nextest run --workspace --lib \ | ||
|
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. Could we have a target in the Makefile for this instead, please? We try to have all the commands run by the CI in the Makefile.
Contributor
Author
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. I added a TODO here. I want the changes to be apparent here for this specific job. Once we remove all the |
||
| --exclude mina-core \ | ||
| --exclude mina-fuzzer \ | ||
| --exclude mina-macros \ | ||
| --exclude mina-p2p-messages \ | ||
| --exclude poseidon \ | ||
| --exclude snark \ | ||
| --exclude p2p \ | ||
| --exclude salsa-simple \ | ||
| --exclude p2p-testing \ | ||
| --exclude libp2p-rpc-behaviour \ | ||
| --exclude node \ | ||
| --exclude mina-node-account \ | ||
| --exclude vrf \ | ||
| --exclude mina-node-common \ | ||
| --exclude mina-node-native \ | ||
| --exclude mina-node-web \ | ||
| --exclude mina-node-invariants \ | ||
| --exclude mina-node-testing \ | ||
| --exclude cli \ | ||
| --exclude replay_dynamic_effects \ | ||
| --exclude mina-transport \ | ||
| --exclude mina-bootstrap-sandbox \ | ||
| --exclude mina-gossipsub-sandbox \ | ||
| --exclude hash-tool \ | ||
| --exclude ledger-tool \ | ||
| --exclude transaction_fuzzer \ | ||
| --exclude mina-archive-breadcrumb-compare \ | ||
| --exclude webrtc-sniffer | ||
| # --exclude mina-tree | ||
|
|
||
| account-tests: | ||
| timeout-minutes: 20 | ||
| runs-on: ubuntu-24.04 | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1033,14 +1033,15 @@ mod tests { | |
| use mina_curves::pasta::Fp; | ||
| use mina_p2p_messages::{binprot::BinProtRead, v2}; | ||
|
|
||
| use crate::proofs::{provers::devnet_circuit_directory, transaction::tests::panic_in_ci}; | ||
| use crate::proofs::provers::devnet_circuit_directory; | ||
|
|
||
| use super::*; | ||
|
|
||
| #[cfg(target_family = "wasm")] | ||
| use wasm_bindgen_test::wasm_bindgen_test as test; | ||
|
|
||
| #[test] | ||
| #[ignore = "the file are missing"] | ||
|
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. |
||
| fn test_verify_zkapp() { | ||
| use mina_p2p_messages::{ | ||
| binprot, | ||
|
|
@@ -1066,10 +1067,7 @@ mod tests { | |
| ]; | ||
|
|
||
| for filename in cases { | ||
| let Ok(file) = std::fs::read(base_dir.join(filename)) else { | ||
| panic_in_ci(); | ||
| return; | ||
| }; | ||
| let file = std::fs::read(base_dir.join(filename)).expect("file not found"); | ||
|
|
||
| let VerifyZkapp { | ||
| vk, | ||
|
|
||
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.
IIUC, we will have a job per unit test later. At the moment, it is only running the tests for the ledger (mina-tree).
Uh oh!
There was an error while loading. Please reload this page.
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.
Note that we run already the tests of this crate. It is called
ledger-tests. I would accept for now, as probably you'll do in a follow-up an improvement of it.