Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Nightly

on:
schedule:
- cron: "0 2 * * *"
workflow_dispatch:

env:
CARGO_TERM_COLOR: always

jobs:
slow-tests:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true

- name: Run slow tests (generate_key_pair)
run: cargo test --release --workspace -- --ignored --nocapture

slow-tests-devnet3:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true

- name: Run slow tests devnet3
run: cargo test --release --workspace --no-default-features --features "devnet3" -- --ignored --nocapture --test-threads=1
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ test-devnet2: # Run all tests for for Devnet 2.

.PHONY: test-devnet3
test-devnet3: # Run all tests for for Devnet 3.
cargo test --workspace --no-default-features --features "devnet3" -- --nocapture --test-threads=1
cargo test --workspace --no-default-features --features "devnet3" -- --nocapture


.PHONY: fmt
Expand Down
16 changes: 9 additions & 7 deletions bin/ream/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -881,10 +881,12 @@ mod tests {

#[test]
fn test_lean_node_finalizes() {
let _ = tracing_subscriber::fmt()
.with_env_filter(Verbosity::Info.directive())
.with_test_writer()
.try_init();
if false {
let _ = tracing_subscriber::fmt()
.with_env_filter(Verbosity::Info.directive())
.with_test_writer()
.try_init();
}

let cli = Cli::parse_from([
"ream",
Expand Down Expand Up @@ -994,7 +996,7 @@ mod tests {
}

fn run_multi_node_finalization_test(topology: Vec<Vec<usize>>, test_name: &str) {
if true {
if false {
let _ = tracing_subscriber::fmt()
.with_env_filter(Verbosity::Info.directive())
.with_test_writer()
Expand Down Expand Up @@ -1183,7 +1185,7 @@ mod tests {
let topology = [vec![], vec![0], vec![0, 1]];
let test_name = "late_joiner_sync";

if true {
if false {
let _ = tracing_subscriber::fmt()
.with_env_filter(Verbosity::Info.directive())
.with_test_writer()
Expand Down Expand Up @@ -1451,7 +1453,7 @@ mod tests {
"REAM_KNOWN_GOOD_BIN path does not exist: {known_good_bin}"
);

if true {
if false {
let _ = tracing_subscriber::fmt()
.with_env_filter(Verbosity::Info.directive())
.with_test_writer()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ mod tests {
};

#[test]
#[ignore = "slow: uses generate_key_pair, run in nightly CI"]
fn test_aggregate_and_verify() {
setup_prover();
setup_verifier();
Expand Down
1 change: 1 addition & 0 deletions crates/crypto/post_quantum/src/leansig/private_key.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ mod tests {
use crate::leansig::private_key::PrivateKey;

#[test]
#[ignore = "slow: uses generate_key_pair, run in nightly CI"]
fn test_sign_and_verify() {
let mut rng = rng();
let activation_epoch = 0;
Expand Down
1 change: 1 addition & 0 deletions crates/crypto/post_quantum/src/leansig/signature.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ mod tests {
use crate::leansig::{private_key::PrivateKey, signature::Signature};

#[test]
#[ignore = "slow: uses generate_key_pair, run in nightly CI"]
fn test_serialization_roundtrip() {
let mut rng = rng();
let activation_epoch = 0;
Expand Down
19 changes: 0 additions & 19 deletions testing/lean-spec-tests/tests/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ use std::{env, fs, path::PathBuf};
use lean_spec_tests::fork_choice::{load_fork_choice_test, run_fork_choice_test};
use lean_spec_tests::state_transition::{load_state_transition_test, run_state_transition_test};
use tracing::{debug, error, info, warn};
use tracing_subscriber::EnvFilter;

/// Helper to find all JSON files in a directory recursively
fn find_json_files(dir: &str) -> Vec<PathBuf> {
Expand Down Expand Up @@ -37,15 +36,6 @@ fn find_json_files(dir: &str) -> Vec<PathBuf> {
#[tokio::test]
#[cfg(feature = "devnet2")]
async fn test_all_fork_choice_fixtures() {
// Initialize tracing subscriber for test output
let env_filter = match env::var(EnvFilter::DEFAULT_ENV) {
Ok(filter) => EnvFilter::builder().parse_lossy(filter),
Err(_) => EnvFilter::new("info"),
};
let _ = tracing_subscriber::fmt()
.with_env_filter(env_filter)
.try_init();

let fixtures = find_json_files("fixtures/devnet2/fork_choice");

if fixtures.is_empty() {
Expand Down Expand Up @@ -98,15 +88,6 @@ async fn test_all_fork_choice_fixtures() {

#[test]
fn test_all_state_transition_fixtures() {
// Initialize tracing subscriber for test output
let env_filter = match env::var(EnvFilter::DEFAULT_ENV) {
Ok(filter) => EnvFilter::builder().parse_lossy(filter),
Err(_) => EnvFilter::new("info"),
};
let _ = tracing_subscriber::fmt()
.with_env_filter(env_filter)
.try_init();

let fixtures = find_json_files("fixtures/devnet2/state_transition");

if fixtures.is_empty() {
Expand Down
Loading