mirror of
https://github.com/qdrant/qdrant.git
synced 2026-07-30 22:51:00 -05:00
* ci: centralize protoc setup in a composite action Add .github/actions/setup-protoc that pins both the arduino/setup-protoc SHA and the protoc version (34.1) in one place, so future bumps no longer require touching every workflow. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * ci: replace arduino/setup-protoc with direct release-zip download The arduino action queries the GitHub API on every invocation even when the version is fully pinned, which is unnecessary work. Inline a small shell step that downloads the protoc release zip directly using RUNNER_OS/RUNNER_ARCH for asset selection. Supports Linux, macOS, and Windows (x64 + arm64 where protobuf publishes assets). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
107 lines
4.5 KiB
YAML
107 lines
4.5 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@631a55b12751854ce901bb631d5902ceb48146f7 # stable
|
|
with:
|
|
components: llvm-tools-preview
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
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@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
|
|
- name: Install Protoc
|
|
uses: ./.github/actions/setup-protoc
|
|
- name: Install nextest
|
|
uses: taiki-e/install-action@3a0adc33ab45d7b9b9da91822dd2b3c0151704be # 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@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
|
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@631a55b12751854ce901bb631d5902ceb48146f7 # stable
|
|
with:
|
|
components: llvm-tools-preview
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
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@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
|
|
- name: Install Protoc
|
|
uses: ./.github/actions/setup-protoc
|
|
- name: Install nextest
|
|
uses: taiki-e/install-action@3a0adc33ab45d7b9b9da91822dd2b3c0151704be # 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@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
|
|
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@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
|
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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
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@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
|
with:
|
|
name: unit-test-coverage
|
|
- name: Download integration test coverage
|
|
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
|
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@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6.0.0
|
|
with:
|
|
files: merged.lcov
|
|
override_branch: ${{ github.event_name == 'schedule' && 'dev' || github.ref_name }}
|
|
token: ${{ secrets.CODECOV_TOKEN }}
|
|
verbose: true
|