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

Integration tests #148

Merged
merged 21 commits into from
Oct 24, 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
2 changes: 2 additions & 0 deletions .clippy.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
disallowed-names = [ "TYPES" ]
doc-valid-idents = [ "HotShot", ".." ]
34 changes: 32 additions & 2 deletions .github/workflows/build.yml → .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build
name: Test

on:
push:
Expand All @@ -13,7 +13,7 @@ concurrency:
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
build:
test:
runs-on: ubuntu-latest
env:
RUSTFLAGS: '--cfg async_executor_impl="async-std" --cfg async_channel_impl="async-std"'
Expand Down Expand Up @@ -41,3 +41,33 @@ jobs:
--lib --bins --tests --benches --all-features \
--verbose --no-fail-fast
timeout-minutes: 60

test-ignored:
runs-on: ubuntu-latest
env:
RUSTFLAGS: '--cfg async_executor_impl="async-std" --cfg async_channel_impl="async-std"'
RUST_MIN_STACK: 64000000
RUST_LOG: info
steps:
- uses: styfle/[email protected]
name: Cancel Outdated Builds
with:
all_but_latest: true
access_token: ${{ github.token }}

- uses: actions/checkout@v4
name: Checkout Repository

- uses: dtolnay/rust-toolchain@stable

- uses: taiki-e/install-action@nextest

- uses: Swatinem/rust-cache@v2
name: Enable Rust Caching

- name: Run slow tests
run: |
cargo nextest run --workspace --release -j 1 \
--lib --bins --tests --benches --all-features \
--verbose --no-fail-fast --run-ignored only
timeout-minutes: 60
162 changes: 162 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ members = ["crates/*"]
hotshot = { git = "https://github.com/EspressoSystems/HotShot.git", tag = "0.5.78" }
hotshot-builder-api = { git = "https://github.com/EspressoSystems/HotShot.git", tag = "0.5.78" }
hotshot-events-service = { git = "https://github.com/EspressoSystems/hotshot-events-service.git", tag = "0.1.50" }
hotshot-macros = { git = "https://github.com/EspressoSystems/HotShot.git", tag = "0.5.78" }
hotshot-task-impls = { git = "https://github.com/EspressoSystems/HotShot.git", tag = "0.5.78" }
hotshot-testing = { git = "https://github.com/EspressoSystems/HotShot.git", tag = "0.5.78" }
hotshot-types = { git = "https://github.com/EspressoSystems/HotShot.git", tag = "0.5.78" }
hotshot-example-types = { git = "https://github.com/EspressoSystems/HotShot.git", tag = "0.5.78" }

Expand All @@ -18,13 +20,16 @@ async-std = "1.9.0"
async-trait = "0.1"
bincode = "1.3"
clap = "4.5"
chrono = { version = "0.4", features = ["serde"] }
committable = "0.2"
derivative = "2.2"
either = "1.13"
futures = "0.3"
hex = "0.4.3"
lru = "0.12.5"
multimap = "0.10.0"
num_cpus = "1.16"
rand = "0.8"
serde = "1.0"
serde_json = "1.0"
sha2 = "0.10"
Expand All @@ -37,6 +42,7 @@ toml = "0.8"
tracing = "0.1"
url = "2.3"
vbs = "0.1"
vec1 = "1.12"

[workspace.package]
version = "0.1.51"
Expand All @@ -49,6 +55,7 @@ unexpected_cfgs = { level = "warn", check-cfg = [
] }

[workspace.lints.clippy]
disallowed-names = "deny"
doc_markdown = "deny"
doc_link_with_quotes = "deny"

Expand Down
12 changes: 3 additions & 9 deletions crates/legacy/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1350,15 +1350,9 @@ impl<Types: NodeType> From<HandleReceivedTxnsError<Types>> for BuildError {
HandleReceivedTxnsError::TransactionTooBig {
estimated_length,
max_txn_len,
} => BuildError::Error(
format!("Transaction too big (estimated length {estimated_length}, currently accepting <= {max_txn_len})")
),
HandleReceivedTxnsError::TooManyTransactions => BuildError::Error(
"Too many transactions".to_owned()
),
HandleReceivedTxnsError::Internal(err) => BuildError::Error(
format!("Internal error when submitting transaction: {}", err)
),
} => BuildError::Error(format!("Transaction too big (estimated length {estimated_length}, currently accepting <= {max_txn_len})")),
HandleReceivedTxnsError::TooManyTransactions => BuildError::Error("Too many transactions".to_owned()),
HandleReceivedTxnsError::Internal(err) => BuildError::Error(format!("Internal error when submitting transaction: {}", err)),
}
}
}
Expand Down
3 changes: 3 additions & 0 deletions crates/marketplace/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,13 @@ hex = { workspace = true }
hotshot = { workspace = true }
hotshot-builder-api = { workspace = true }
hotshot-events-service = { workspace = true }
hotshot-macros = { workspace = true }
hotshot-task-impls = { workspace = true }
hotshot-testing = { workspace = true }
hotshot-types = { workspace = true }
lru = { workspace = true }
multimap = { workspace = true }
num_cpus = { workspace = true }
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
sha2 = { workspace = true }
Expand Down
4 changes: 1 addition & 3 deletions crates/marketplace/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -450,9 +450,7 @@ where
&self.builder_keys.1,
response.offered_fee,
)
.map_err(|e| BuildError::Error(
e.to_string()
))?;
.map_err(|e| BuildError::Error(e.to_string()))?;

let sequencing_fee: BuilderFee<Types> = BuilderFee {
fee_amount: response.offered_fee,
Expand Down
Loading
Loading