Files
qdrant/.github/workflows/coverage.yml
dependabot[bot] 4cba3c08e0 build(deps): bump actions/download-artifact from 7 to 8 (#8266)
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 7 to 8.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v7...v8)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-version: '8'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-03 11:17:40 +01:00

111 lines
4.0 KiB
YAML

name: Coverage Report - dev
on:
workflow_dispatch: # Trigger from UI for selected branch
schedule:
- cron: "0 0 * * *" # Every day at midnight UTC
env:
UV_VERSION: 0.9.17
jobs:
unit-coverage:
runs-on: ubuntu-latest
steps:
- name: Install minimal stable
uses: dtolnay/rust-toolchain@stable
with:
components: llvm-tools-preview
- uses: actions/checkout@v6
with:
# If scheduled by cron, run for dev branch, Otherwise specified branch (for workflow dispatch & push)
ref: ${{ github.event_name == 'schedule' && 'dev' || github.ref_name }}
fetch-depth: 0
- uses: Swatinem/rust-cache@v2
- name: Install Protoc
uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install nextest
uses: taiki-e/install-action@nextest
- name: Install llvm-cov
run: cargo install cargo-llvm-cov && sudo apt install -y lcov
- name: Run unit tests with coverage
run: RUN_PER_PACKAGE=true tools/unit-test-coverage.sh
- name: Upload unit test coverage artifact
uses: actions/upload-artifact@v7
with:
name: unit-test-coverage
path: unit-test-coverage.lcov
retention-days: 1
integration-coverage:
runs-on: ubuntu-latest
steps:
- name: Install minimal stable
uses: dtolnay/rust-toolchain@stable
with:
components: llvm-tools-preview
- uses: actions/checkout@v6
with:
# If scheduled by cron, run for dev branch, Otherwise specified branch (for workflow dispatch & push)
ref: ${{ github.event_name == 'schedule' && 'dev' || github.ref_name }}
fetch-depth: 0
- uses: Swatinem/rust-cache@v2
- name: Install Protoc
uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install nextest
uses: taiki-e/install-action@nextest
- name: Install llvm-cov
run: cargo install cargo-llvm-cov && sudo apt install -y lcov
- name: Install dependencies
run: sudo apt-get install clang
- uses: actions/setup-python@v6
with:
python-version: '3.13'
- name: Install uv and Python dependencies
run: |
curl -LsSf https://astral.sh/uv/$UV_VERSION/install.sh | sh
echo "$HOME/.local/bin" >> $GITHUB_PATH
uv --project tests lock --check
uv --project tests sync
- name: Run integration tests with coverage
run: tools/integration-test-coverage.sh
- name: Upload integration test coverage artifact
uses: actions/upload-artifact@v7
with:
name: integration-test-coverage
path: integration-test-coverage.lcov
retention-days: 1
merge-and-upload:
needs: [unit-coverage, integration-coverage]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
# If scheduled by cron, run for dev branch, Otherwise specified branch (for workflow dispatch & push)
ref: ${{ github.event_name == 'schedule' && 'dev' || github.ref_name }}
fetch-depth: 0 # Fetch all history for all tags and branches
- name: Install lcov
run: sudo apt install -y lcov
- name: Download unit test coverage
uses: actions/download-artifact@v8
with:
name: unit-test-coverage
- name: Download integration test coverage
uses: actions/download-artifact@v8
with:
name: integration-test-coverage
- name: Merge coverage reports
run: lcov -a unit-test-coverage.lcov -a integration-test-coverage.lcov -o merged.lcov
- name: Upload coverage data to Codecov
uses: codecov/codecov-action@v5
with:
files: merged.lcov
override_branch: ${{ github.event_name == 'schedule' && 'dev' || github.ref_name }}
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true