mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-07-30 16:31:57 +00:00
15
.github/workflows/interop-test.yml
vendored
15
.github/workflows/interop-test.yml
vendored
@@ -12,7 +12,7 @@ concurrency:
|
||||
jobs:
|
||||
build-ping-container:
|
||||
name: Build Ping interop container
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
@@ -24,18 +24,23 @@ jobs:
|
||||
- name: Install Protoc
|
||||
run: sudo apt-get install protobuf-compiler
|
||||
- name: Build image
|
||||
working-directory: ./test-plans
|
||||
run: make
|
||||
working-directory: ./interop-tests
|
||||
run: |
|
||||
cargo build --release -p interop-tests
|
||||
mkdir -p target/release/
|
||||
cp ../target/release/ping target/release
|
||||
docker build -t rust-libp2p-head .
|
||||
docker image save -o ping-image.tar rust-libp2p-head
|
||||
- name: Upload ping versions info
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: ping-versions
|
||||
path: ./test-plans/ping-versions.json
|
||||
path: ./interop-tests/ping-versions.json
|
||||
- name: Upload image tar
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: ping-image
|
||||
path: ./test-plans/ping-image.tar
|
||||
path: ./interop-tests/ping-image.tar
|
||||
run-multidim-interop:
|
||||
name: Run multidimensional interoperability tests
|
||||
needs: build-ping-container
|
||||
|
@@ -166,7 +166,7 @@ members = [
|
||||
"protocols/request-response",
|
||||
"swarm",
|
||||
"swarm-derive",
|
||||
"test-plans",
|
||||
"interop-tests",
|
||||
"transports/deflate",
|
||||
"transports/dns",
|
||||
"transports/noise",
|
||||
|
@@ -7,14 +7,14 @@ publish = false
|
||||
[dependencies]
|
||||
anyhow = "1"
|
||||
async-trait = "0.1.58"
|
||||
either = "1.8.0"
|
||||
env_logger = "0.9.0"
|
||||
futures = "0.3.1"
|
||||
if-addrs = "0.7.0"
|
||||
libp2p = { path = "../", default_features = false, features = ["websocket", "quic", "mplex", "yamux", "tcp", "tokio", "ping", "noise", "tls", "dns", "rsa", "macros", "webrtc"] }
|
||||
log = "0.4"
|
||||
rand = "0.8.5"
|
||||
redis = { version = "0.22.1", features = ["tokio-native-tls-comp", "tokio-comp"] }
|
||||
strum = { version = "0.24.1", features = ["derive"] }
|
||||
tokio = { version = "1.24.1", features = ["full"] }
|
||||
|
||||
libp2p = { path = "../", default_features = false, features = ["websocket", "quic", "mplex", "yamux", "tcp", "tokio", "ping", "noise", "tls", "dns", "rsa", "macros", "webrtc"] }
|
||||
rand = "0.8.5"
|
||||
strum = { version = "0.24.1", features = ["derive"] }
|
||||
either = "1.8.0"
|
@@ -1,4 +1,4 @@
|
||||
FROM ubuntu:latest
|
||||
FROM ubuntu:22.04
|
||||
COPY target/release/ping /usr/local/bin/testplan
|
||||
ENV RUST_BACKTRACE=1
|
||||
ENTRYPOINT ["testplan"]
|
@@ -1,6 +1,6 @@
|
||||
# test-plans test implementation
|
||||
# Interop tests implementation
|
||||
|
||||
This folder defines the implementation for the test-plans interop tests.
|
||||
This folder defines the implementation for the interop tests.
|
||||
|
||||
# Running this test locally
|
||||
|
@@ -4,7 +4,7 @@ use std::time::Duration;
|
||||
|
||||
use anyhow::{Context, Result};
|
||||
use either::Either;
|
||||
use env_logger::Env;
|
||||
use env_logger::{Env, Target};
|
||||
use futures::{AsyncRead, AsyncWrite, StreamExt};
|
||||
use libp2p::core::muxing::StreamMuxerBox;
|
||||
use libp2p::core::transport::Boxed;
|
||||
@@ -177,7 +177,9 @@ async fn main() -> Result<()> {
|
||||
let mut conn = client.get_async_connection().await?;
|
||||
|
||||
log::info!("Running ping test: {}", swarm.local_peer_id());
|
||||
env_logger::Builder::from_env(Env::default().default_filter_or("info")).init();
|
||||
env_logger::Builder::from_env(Env::default().default_filter_or("info"))
|
||||
.target(Target::Stdout)
|
||||
.init();
|
||||
|
||||
log::info!(
|
||||
"Test instance, listening for incoming connections on: {:?}.",
|
@@ -1,14 +0,0 @@
|
||||
all: ping-image.tar
|
||||
|
||||
ping-image.tar: Dockerfile Cargo.toml src/bin/ping.rs
|
||||
cargo build --release -p interop-tests
|
||||
mkdir -p target/release/
|
||||
cp ../target/release/ping target/release
|
||||
docker build -t rust-libp2p-head .
|
||||
docker image save -o $@ rust-libp2p-head
|
||||
|
||||
.PHONY: clean
|
||||
|
||||
clean:
|
||||
rm -rf target
|
||||
rm ping-image.tar
|
Reference in New Issue
Block a user