Skip to content

Commit

Permalink
Merge pull request #4 from tangle-network/serial/test
Browse files Browse the repository at this point in the history
fix: get test working
  • Loading branch information
drewstone authored Dec 10, 2024
2 parents 2519490 + 19d2d0f commit c8ec846
Show file tree
Hide file tree
Showing 8 changed files with 154 additions and 345 deletions.
14 changes: 4 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ concurrency:
group: rust-validation-${{ github.head_ref }}
cancel-in-progress: true

env:
RUST_LOG: "gadget=trace"

jobs:
fmt:
name: Rustfmt
Expand Down Expand Up @@ -91,19 +94,10 @@ jobs:
with:
cache-on-failure: "true"

- uses: taiki-e/install-action@v2
with:
tool: nextest

- name: Forge build
run: forge update && forge build

- uses: taiki-e/github-actions/free-device-space@main

- name: Download Tangle Manual Sealing
run: |
wget https://github.com/tangle-network/tangle/releases/download/v1.2.3/tangle-testnet-manual-seal-linux-amd64
chmod +x tangle-testnet-manual-seal-linux-amd64
- name: tests
run: TANGLE_NODE=$(pwd)/tangle-testnet-manual-seal-linux-amd64 cargo nextest run
run: cargo test -- --test-threads=1
295 changes: 0 additions & 295 deletions .github/workflows/release.yml

This file was deleted.

10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ edition = "2021"
manager = { Evm = "BlsBlueprint" }

[dependencies]
gadget-sdk = { git = "https://github.com/tangle-network/gadget/", features = ["std"] }
gadget-sdk = { git = "https://github.com/tangle-network/gadget", branch = "drew/download-binary", features = ["std"] }
color-eyre = { version = "0.6", features = ["tracing-error", "color-spantrace"] }
tokio = { version = "1.40", default-features = false, features = ["full"] }
hex = { version = "0.4.3", default-features = false }
k256 = { version = "0.13.3", default-features = false }
bincode = "1.3.3"
Expand All @@ -28,11 +27,12 @@ snowbridge-milagro-bls = "1.5.4"
gennaro-dkg = { version = "0.8.0", features = ["curve25519"]}

[build-dependencies]
blueprint-metadata = { git = "https://github.com/tangle-network/gadget/" }
blueprint-metadata = { git = "https://github.com/tangle-network/gadget", branch = "drew/download-binary" }

[dev-dependencies]
blueprint-test-utils = { git = "https://github.com/tangle-network/gadget/" }
cargo-tangle = { git = "https://github.com/tangle-network/gadget/" }
blueprint-test-utils = { git = "https://github.com/tangle-network/gadget", branch = "drew/download-binary" }
cargo-tangle = { git = "https://github.com/tangle-network/gadget", branch = "drew/download-binary" }
tokio = { version = "1.42.0", features = ["test-util"] }
#alloy-primitives = "0.7.2"

[features]
Expand Down
2 changes: 0 additions & 2 deletions build.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
fn main() {
println!("cargo:rerun-if-changed=src/cli");
println!("cargo:rerun-if-changed=src/lib.rs");
println!("cargo:rerun-if-changed=src/main.rs");
println!("cargo:rerun-if-changed=src/*");
blueprint_metadata::generate_json();
}
4 changes: 2 additions & 2 deletions remappings.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
forge-std/=dependencies/forge-std-1.9.4/src/
tnt-core/=dependencies/tnt-core-0.1.0/src/
forge-std/=dependencies/forge-std-1.9.4/src
tnt-core/=dependencies/tnt-core-0.1.0/src
2 changes: 1 addition & 1 deletion soldeer.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ integrity = "3874463846ab995a6a9a88412913cacec6144f7605daa1af57c2d8bf3f210b13"
name = "tnt-core"
version = "0.1.0"
git = "https://github.com/tangle-network/tnt-core.git"
rev = "dc71ca12f9b5d01b898adb2057c9b8846c90bda2"
rev = "df6d5d6da3c82217405c408d3c0b11369bb3e5c2"
3 changes: 3 additions & 0 deletions src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ const NETWORK_PROTOCOL: &str = "/bls/gennaro/1.0.0";
pub struct BlsContext {
#[config]
pub config: sdk::config::StdGadgetConfiguration,
#[call_id]
pub call_id: Option<u64>,
pub network_backend: Arc<NetworkMultiplexer>,
pub store: Arc<LocalDatabase<BlsState>>,
pub identity: ecdsa::Pair,
Expand Down Expand Up @@ -52,6 +54,7 @@ impl BlsContext {
Ok(Self {
store,
identity,
call_id: None,
config,
network_backend: Arc::new(NetworkMultiplexer::new(gossip_handle)),
})
Expand Down
Loading

0 comments on commit c8ec846

Please sign in to comment.