From f2ade45065fd0253f2d44d7d9a56a98bc38d8091 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 20 Jan 2026 23:30:47 +0000 Subject: [PATCH 1/4] Initial plan From baefd6f323d89862168258507084adb9341e61b9 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 20 Jan 2026 23:33:55 +0000 Subject: [PATCH 2/4] Enable code coverage in CI with 90% requirement for changed lines Co-authored-by: arrayka <1551741+arrayka@users.noreply.github.com> --- .codecov.yml | 35 ++++++++++++++++++ .github/workflows/ci.yml | 78 +++++++++++++++++++--------------------- 2 files changed, 72 insertions(+), 41 deletions(-) create mode 100644 .codecov.yml diff --git a/.codecov.yml b/.codecov.yml new file mode 100644 index 000000000..937d50116 --- /dev/null +++ b/.codecov.yml @@ -0,0 +1,35 @@ +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT license. + +# Codecov configuration for DiskANN Rust code coverage +# See: https://docs.codecov.com/docs/codecov-yaml + +coverage: + status: + # Project coverage (overall) - informational only + project: + default: + target: auto + threshold: 1% + informational: true + + # Patch coverage (changed lines only) - this will block PRs + patch: + default: + target: 90% + threshold: 0% + informational: false + +comment: + layout: "reach,diff,flags,tree" + behavior: default + require_changes: false + require_base: false + require_head: true + +ignore: + - "test_data/**" + - "**/*_test.rs" + - "**/tests/**" + - "**/benches/**" + - "**/examples/**" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ccf812649..4b2e00669 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -158,51 +158,47 @@ jobs: cargo test --doc --workspace --profile ci - # coverage: - # needs: basics - # name: code coverage - # runs-on: ubuntu-latest - # steps: - # - uses: actions/checkout@v4 - # with: - # lfs: true + coverage: + needs: basics + name: code coverage + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + lfs: true + fetch-depth: 0 - # - name: Install Rust ${{ env.rust_stable }} - # uses: dtolnay/rust-toolchain@stable - # with: - # toolchain: ${{ env.rust_stable }} - # components: llvm-tools-preview + - name: Install Rust ${{ env.rust_stable }} + uses: dtolnay/rust-toolchain@stable + with: + toolchain: ${{ env.rust_stable }} + components: llvm-tools-preview - # - name: Install cargo-llvm-cov - # uses: taiki-e/install-action@v2 - # with: - # tool: cargo-llvm-cov + - name: Install cargo-llvm-cov + uses: taiki-e/install-action@v2 + with: + tool: cargo-llvm-cov - # - name: Install cargo-nextest - # uses: taiki-e/install-action@v2 - # with: - # tool: cargo-nextest + - name: Install cargo-nextest + uses: taiki-e/install-action@v2 + with: + tool: cargo-nextest - # - uses: Swatinem/rust-cache@v2 - # - name: Generate code coverage - # run: | - # cargo llvm-cov nextest --cargo-profile ci \ - # --package diskann-wide \ - # --package diskann-vector \ - # --package diskann-quantization \ - # --package diskann \ - # --package diskann-linalg \ - # --package diskann-utils \ - # --package diskann-disk \ - # --lcov --output-path lcov.info - - # - name: Upload coverage to Codecov - # uses: codecov/codecov-action@v4 - # with: - # files: lcov.info - # fail_ci_if_error: false - # env: - # CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + - uses: Swatinem/rust-cache@v2 + + - name: Generate code coverage + run: | + cargo llvm-cov nextest --cargo-profile ci \ + --workspace \ + --lcov --output-path lcov.info + + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v4 + with: + files: lcov.info + fail_ci_if_error: true + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} # miri: # needs: basics From 9b3604744550fe73adf13aa23958910195f07583 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 20 Jan 2026 23:35:49 +0000 Subject: [PATCH 3/4] Fix trailing whitespace in CI workflow Co-authored-by: arrayka <1551741+arrayka@users.noreply.github.com> --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4b2e00669..497e4b64c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -185,7 +185,7 @@ jobs: tool: cargo-nextest - uses: Swatinem/rust-cache@v2 - + - name: Generate code coverage run: | cargo llvm-cov nextest --cargo-profile ci \ From 1052ee5c6f8c390ea50e8b711a35025f222c346a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 20 Jan 2026 23:36:32 +0000 Subject: [PATCH 4/4] Fix trailing whitespace in codecov.yml Co-authored-by: arrayka <1551741+arrayka@users.noreply.github.com> --- .codecov.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.codecov.yml b/.codecov.yml index 937d50116..a82643900 100644 --- a/.codecov.yml +++ b/.codecov.yml @@ -12,7 +12,7 @@ coverage: target: auto threshold: 1% informational: true - + # Patch coverage (changed lines only) - this will block PRs patch: default: