From ec47c21375afa70e543668af7e5ab498ef5cae43 Mon Sep 17 00:00:00 2001 From: Dmitry Tantsur Date: Mon, 23 Jun 2025 20:38:44 +0200 Subject: [PATCH 1/2] chore(ci): run separate tests for each service in isolation --- .github/workflows/main.yml | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3e86eeb4f6..fd036e1fef 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -3,7 +3,7 @@ on: [push, pull_request] jobs: test: - name: Unit tests on ${{ matrix.rust }} ${{ matrix.flags}} + name: Unit tests on ${{ matrix.rust }} ${{ matrix.flags }} runs-on: ubuntu-latest strategy: fail-fast: false @@ -12,7 +12,6 @@ jobs: flags: - "" - "--no-default-features" - - "--no-default-features --features rustls" steps: - uses: actions/checkout@master - name: Install Rust @@ -22,6 +21,30 @@ jobs: - name: Run unit tests run: cargo test --lib --verbose ${{ matrix.flags }} + features: + name: Unit tests for ${{ matrix.features }} + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + features: + - "rustls" + - "baremetal" + - "block-storage" + - "compute" + - "identity" + - "image" + - "network" + - "object-storage" + steps: + - uses: actions/checkout@master + - name: Install Rust + run: | + rustup update stable --no-self-update + rustup default stable + - name: Run unit tests + run: cargo test --lib --verbose --no-default-features --features ${{ matrix.features }} + rustfmt: name: Formatting runs-on: ubuntu-latest From 9873751848a89b8d384f5b02c581de2fd43c72b3 Mon Sep 17 00:00:00 2001 From: Dmitry Tantsur Date: Mon, 23 Jun 2025 20:48:40 +0200 Subject: [PATCH 2/2] chore: make dead code validator happy --- src/baremetal/protocol.rs | 1 + src/block_storage/volumes.rs | 1 + src/image/images.rs | 1 + 3 files changed, 3 insertions(+) diff --git a/src/baremetal/protocol.rs b/src/baremetal/protocol.rs index 1f27dfcc81..9d1f621852 100644 --- a/src/baremetal/protocol.rs +++ b/src/baremetal/protocol.rs @@ -135,6 +135,7 @@ pub struct NodesRoot { } #[derive(Debug, Clone, Default, Serialize)] +#[allow(dead_code)] // FIXME(dtantsur): remove when creating is implemented pub struct NodeCreate { #[serde(skip_serializing_if = "Option::is_none")] pub automated_clean: Option, diff --git a/src/block_storage/volumes.rs b/src/block_storage/volumes.rs index 970c884b94..7d2c3e5929 100644 --- a/src/block_storage/volumes.rs +++ b/src/block_storage/volumes.rs @@ -447,6 +447,7 @@ impl From for VolumeRef { #[cfg(feature = "block-storage")] impl VolumeRef { /// Verify this reference and convert to an ID, if possible. + #[allow(dead_code)] pub(crate) async fn into_verified(self, session: &Session) -> Result { Ok(if self.verified { self diff --git a/src/image/images.rs b/src/image/images.rs index 6afba93bda..07212e27ab 100644 --- a/src/image/images.rs +++ b/src/image/images.rs @@ -260,6 +260,7 @@ impl From for ImageRef { #[cfg(feature = "image")] impl ImageRef { /// Verify this reference and convert to an ID, if possible. + #[allow(dead_code)] pub(crate) async fn into_verified(self, session: &Session) -> Result { Ok(if self.verified { self