Skip to content
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

chore: add small rust ci to for better pr validation #25

Merged
merged 6 commits into from
Oct 7, 2024
Merged
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
40 changes: 40 additions & 0 deletions .github/workflows/rust-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Rust CI

on:
push:
branches: [main]
merge_group:
pull_request:

env:
CARGO_TERM_COLOR: always

jobs:
cargo-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: taiki-e/install-action@just
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
- uses: taiki-e/install-action@nextest
- name: tests
run: just test

cargo-lint:
runs-on: ubuntu-latest
timeout-minutes: 20
name: lint
steps:
- uses: actions/checkout@v4
- uses: taiki-e/install-action@just
- uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
- name: fmt + lint
run: just fmt
2 changes: 1 addition & 1 deletion world-chain-builder/crates/toolkit/src/cli.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use bytes::{Bytes, BytesMut};
use bytes::Bytes;
use chrono::NaiveDate;
use clap::Parser;
use identity_source::IdentitySource;
Expand Down
4 changes: 3 additions & 1 deletion world-chain-builder/src/e2e_tests/mod.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
//! Utilities for running world chain builder end-to-end tests.
use crate::{
date_marker::DateMarker,
external_nullifier::ExternalNullifier,
node::{
args::{ExtArgs, WorldChainBuilderArgs},
builder::{WorldChainAddOns, WorldChainBuilder},
},
pbh::semaphore::{DateMarker, ExternalNullifier, Proof, SemaphoreProof},
pbh::semaphore::{Proof, SemaphoreProof},
pool::{
ordering::WorldChainOrdering,
root::{LATEST_ROOT_SLOT, OP_WORLD_ID},
Expand Down
1 change: 0 additions & 1 deletion world-chain-builder/src/external_nullifier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ impl FromStr for ExternalNullifier {

#[cfg(test)]
mod tests {
use semaphore::hash_to_field;
use test_case::test_case;

use super::*;
Expand Down
1 change: 0 additions & 1 deletion world-chain-builder/src/pool/validator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,6 @@ pub mod tests {
use tempfile::tempdir;
use test_case::test_case;

use super::*;
use crate::date_marker::DateMarker;
use crate::external_nullifier::ExternalNullifier;
use crate::pbh::db::load_world_chain_db;
Expand Down