From 80483475137643bdd96f92d95efde062dd4756a7 Mon Sep 17 00:00:00 2001 From: David Steiner Date: Mon, 2 Feb 2026 10:32:05 +0100 Subject: [PATCH 1/2] Only run MongoDB tests when hotfix-store-mongodb code has changed --- .github/workflows/ci.yml | 45 +++++++++++++++++++++++++++++++++++----- codecov.yml | 19 +++++++++++++++++ 2 files changed, 59 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6bb3a14..2e6f92f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,19 +22,54 @@ jobs: - name: Run clippy (all targets and features) run: cargo clippy --all-targets --all-features -- -Dclippy::all -D warnings - coverage: + detect-changes: runs-on: ubuntu-latest + outputs: + mongodb: ${{ steps.filter.outputs.mongodb }} + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Detect path changes + uses: dorny/paths-filter@v3 + id: filter + with: + filters: | + mongodb: + - 'crates/hotfix-store-mongodb/**' + - 'crates/hotfix-store/**' + + coverage-core: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Install cargo-llvm-cov + uses: taiki-e/install-action@cargo-llvm-cov + - name: Generate code coverage (excluding MongoDB) + run: cargo llvm-cov --all-features --workspace --exclude hotfix-store-mongodb --lcov --output-path lcov.info + - name: Upload coverage + uses: codecov/codecov-action@v5 + with: + fail_ci_if_error: true + token: ${{ secrets.CODECOV_TOKEN }} + flags: core + files: lcov.info + + coverage-mongodb: + runs-on: ubuntu-latest + needs: detect-changes + if: needs.detect-changes.outputs.mongodb == 'true' steps: - name: Checkout uses: actions/checkout@v4 - name: Install cargo-llvm-cov uses: taiki-e/install-action@cargo-llvm-cov - - name: Generate code coverage - run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info - - name: Upload report + - name: Generate MongoDB coverage + run: cargo llvm-cov --all-features --package hotfix-store-mongodb --lcov --output-path lcov.info + - name: Upload MongoDB coverage uses: codecov/codecov-action@v5 with: fail_ci_if_error: true token: ${{ secrets.CODECOV_TOKEN }} - verbose: true + flags: mongodb files: lcov.info diff --git a/codecov.yml b/codecov.yml index 0d5a543..5837356 100644 --- a/codecov.yml +++ b/codecov.yml @@ -10,3 +10,22 @@ coverage: project: default: target: auto + +flags: + core: + paths: + - crates/hotfix/ + - crates/hotfix-cli/ + - crates/hotfix-codegen/ + - crates/hotfix-derive/ + - crates/hotfix-dictionary/ + - crates/hotfix-message/ + - crates/hotfix-store/ + - crates/hotfix-web/ + - crates/hotfix-web-ui/ + carryforward: true + + mongodb: + paths: + - crates/hotfix-store-mongodb/ + carryforward: true From 4a4d0edd83f8d4897efe3c057bff84dbc10a0779 Mon Sep 17 00:00:00 2001 From: David Steiner Date: Mon, 2 Feb 2026 10:37:08 +0100 Subject: [PATCH 2/2] Dummy change to hotfix-store-mongodb to trigger tests --- crates/hotfix-store-mongodb/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/hotfix-store-mongodb/Cargo.toml b/crates/hotfix-store-mongodb/Cargo.toml index 683096e..33625d7 100644 --- a/crates/hotfix-store-mongodb/Cargo.toml +++ b/crates/hotfix-store-mongodb/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "hotfix-store-mongodb" -description = "MongoDB message store implementation for the hotfix FIX engine" +description = "MongoDB message store implementation for the HotFIX engine" version = "0.1.2" authors.workspace = true edition.workspace = true