From d6838f1f629971165cebf301e519e1772a5d60a8 Mon Sep 17 00:00:00 2001 From: Joonas Koivunen Date: Mon, 2 Aug 2021 15:38:48 +0300 Subject: [PATCH] ci: add dependent crate there is an issue reported in comments of #458 that it happens on any dependent crate, without any code. hoping that this will work as a test case so that we wont introduce such again. --- .github/workflows/ci.yml | 5 +++++ test_dependent_crate/.gitignore | 2 ++ test_dependent_crate/Cargo.toml | 12 ++++++++++++ test_dependent_crate/src/main.rs | 3 +++ 4 files changed, 22 insertions(+) create mode 100644 test_dependent_crate/.gitignore create mode 100644 test_dependent_crate/Cargo.toml create mode 100644 test_dependent_crate/src/main.rs diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b3a9c5903..57eafca92 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -124,6 +124,11 @@ jobs: if: matrix.platform.cross == false run: cargo build --locked --workspace --all-targets + - name: Check dependent crate + if: matrix.platform.cross == false # TODO: unsure if this would matter + run: cargo check + working-directory: test_dependent_crate + - name: Run interop DHT tests with go-ipfs if: matrix.platform.host == 'ubuntu-latest' && matrix.platform.cross == false run: cargo test --features=test_go_interop dht diff --git a/test_dependent_crate/.gitignore b/test_dependent_crate/.gitignore new file mode 100644 index 000000000..1e7caa9ea --- /dev/null +++ b/test_dependent_crate/.gitignore @@ -0,0 +1,2 @@ +Cargo.lock +target/ diff --git a/test_dependent_crate/Cargo.toml b/test_dependent_crate/Cargo.toml new file mode 100644 index 000000000..712209c0b --- /dev/null +++ b/test_dependent_crate/Cargo.toml @@ -0,0 +1,12 @@ +[package] +name = "test_dependent_crate" +version = "0.1.0" +edition = "2018" +description = "Crate plays the part of external dependent crate, see #458" + +[dependencies] +ipfs = { path = "../" } + +# Prevent this from interfering with workspaces +[workspace] +members = ["."] diff --git a/test_dependent_crate/src/main.rs b/test_dependent_crate/src/main.rs new file mode 100644 index 000000000..c5875941d --- /dev/null +++ b/test_dependent_crate/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("It doesn't matter what's here; this crate is meant to be just `cargo check`'d"); +}