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
5 changes: 5 additions & 0 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ jobs:
strategy:
matrix:
python-version: ["3.11", "3.12", "3.13", "3.14"]
suite: [unit, e2e]
fail-fast: false
defaults:
run:
Expand All @@ -68,24 +69,28 @@ jobs:
uses: jdx/mise-action@c37c93293d6b742fc901e1406b8f764f6fb19dac # v2

- name: Cache DSH configuration dependencies
if: matrix.suite == 'unit'
uses: ./.github/actions/cache-pnpm
with:
working-directory: integrations/dsh/plugins/powercontext/tests/config-runtime
cache-dependency-glob: integrations/dsh/plugins/powercontext/tests/config-runtime/pnpm-lock.yaml

- name: Install and resolve native DSH configuration test APIs
if: matrix.suite == 'unit'
run: |
pnpm --dir integrations/dsh/plugins/powercontext/tests/config-runtime install --frozen-lockfile
boot="$(node --input-type=module -e "import { createRequire } from 'node:module'; import { resolve } from 'node:path'; const require = createRequire(resolve('integrations/dsh/plugins/powercontext/tests/config-runtime/package.json')); process.stdout.write(require.resolve('@deepseek-ai/dsh-app-boot'))")"
test -n "$boot" && test -f "$boot" || { echo "DSH configuration runtime unresolved"; exit 1; }
echo "DSH_TEST_CONFIG_BOOT=$boot" >> "$GITHUB_ENV"

- name: Run unit tests
if: matrix.suite == 'unit'
env:
PYTEST_ADDOPTS: --require-dsh-config-runtime
run: make unit-test

- name: Run end-to-end tests
if: matrix.suite == 'e2e'
run: make e2e-test

evaluation-tests:
Expand Down
4 changes: 3 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,9 @@ make unit-test
```

Use `make e2e-test` for cross-component behavior, `make contract-test` for OpenAPI changes, and
`make docs-test` for documentation changes. `make test` runs the complete pytest suite.
`make docs-test` for documentation changes. `make test` runs the complete pytest suite. These pytest targets
spread tests across one worker per CPU with pytest-xdist; pass `PYTEST_WORKERS=0` to run them in a single process,
for example when debugging with `pdb`.

Before raising a pull request you should also run tox when a change may affect supported Python versions.
This requires you to have the relevant Python versions installed. The same version matrix runs in CI.
Expand Down
9 changes: 6 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,21 @@ workflow-actions-check: ## Verify third-party GitHub Actions use immutable commi
@echo "🚀 Static type checking: Running ty for the Pydantic AI integration"
@uv run ty check integrations/pydantic-ai/src

# pytest-xdist worker count; set PYTEST_WORKERS=0 to run tests in a single process.
PYTEST_WORKERS ?= auto

.PHONY: test
test: ## Test the code with pytest
@echo "🚀 Testing code: Running pytest"
@uv run python -m pytest --doctest-modules
@uv run python -m pytest -n $(PYTEST_WORKERS) --doctest-modules

.PHONY: unit-test
unit-test: ## Run tests that do not cross the Server boundary end to end.
@uv run python -m pytest --doctest-modules --ignore=tests/e2e
@uv run python -m pytest -n $(PYTEST_WORKERS) --doctest-modules --ignore=tests/e2e

.PHONY: e2e-test
e2e-test: ## Run CLI to Client SDK to Server end-to-end tests.
@uv run python -m pytest tests/e2e
@uv run python -m pytest -n $(PYTEST_WORKERS) tests/e2e

.PHONY: evaluation-unit-test
evaluation-unit-test: ## Run the evaluation project's unit tests, the work-continuity benchmark included.
Expand Down
1 change: 1 addition & 0 deletions e2e/bub/uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ dev = [
"pytest>=9.0.2",
"time-machine==3.5.0",
"pytest-cov>=7,<8",
"pytest-xdist>=3.6,<4",
"pyyaml>=6,<7",
"prek>=0.2.0",
"tox-uv>=1.33.4",
Expand Down
34 changes: 29 additions & 5 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading