Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,20 @@ coverage:
target: auto
threshold: 0.5%

# The test suite is sharded by component across parallel CI jobs; each shard uploads
# coverage under its own flag. carryforward keeps a flag's last coverage on commits
# where only the other shard ran. The project/patch statuses above operate on the merged total.
flag_management:
default_rules:
carryforward: true
flags:
query_engine:
paths:
- src/impulse_query_engine/
reporting:
paths:
- src/impulse_reporting/

comment: # this is a top-level key
layout: "diff, flags, files"
behavior: default
Expand Down
13 changes: 9 additions & 4 deletions .github/workflows/acceptance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,21 @@ jobs:
run: make lint

test:
name: Testing
name: Testing (${{ matrix.component }})
runs-on:
group: databrickslabs-protected-runner-group
labels: linux-ubuntu-latest
needs: [ not-a-fork, lint ]
permissions:
id-token: write
strategy:
fail-fast: false
matrix:
python-version: [ '3.12' ]
include:
- component: query_engine
path: tests/impulse_query_engine
- component: reporting
path: tests/impulse_reporting

steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
Expand All @@ -90,10 +95,10 @@ jobs:
run: make dev

- name: Run unit tests with coverage
run: make test
run: make test TEST_PATH=${{ matrix.path }}

- name: Upload coverage to Codecov
if: matrix.python-version == '3.12'
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
with:
use_oidc: true
flags: ${{ matrix.component }}
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ export UV_BUILD_CONSTRAINT := .build-constraints.txt

UV_RUN := uv run --exact --all-extras

# Path(s) passed to pytest. Defaults to the whole suite; CI overrides this to run a
# single component's tests in parallel, e.g. `make test TEST_PATH=tests/impulse_query_engine`.
TEST_PATH ?= tests/

clean:
rm -fr .venv htmlcov .pytest_cache .ruff_cache .coverage coverage.xml test-results.xml
find . -name '__pycache__' -print0 | xargs -0 rm -fr
Expand All @@ -28,7 +32,7 @@ fmt:
$(UV_RUN) ruff check src/ tests/ --fix

test:
$(UV_RUN) pytest tests/ --cov=src --cov-branch --cov-report=xml
$(UV_RUN) pytest $(TEST_PATH) --cov=src --cov-branch --cov-report=xml

coverage:
$(UV_RUN) pytest tests/ --cov=src --cov-branch --cov-report=html
Expand Down
Loading