Skip to content

fix: keep stdout parseable, correct advertised examples and the auto-JSON claim #481

fix: keep stdout parseable, correct advertised examples and the auto-JSON claim

fix: keep stdout parseable, correct advertised examples and the auto-JSON claim #481

Workflow file for this run

name: Test
on:
push:
pull_request:
jobs:
test:
name: Test Python ${{ matrix.python-version }} / ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- name: Install uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
- name: Install dependencies
run: uv sync --group testing --locked
- name: Run tests
run: |
uv run pytest tests packages/deepctl-core/tests packages/deepctl-shared-utils/tests packages/deepctl-telemetry/tests packages/deepctl-cmd-api/tests packages/deepctl-cmd-login/tests packages/deepctl-cmd-projects/tests packages/deepctl-cmd-transcribe/tests packages/deepctl-cmd-usage/tests packages/deepctl-cmd-debug/tests packages/deepctl-cmd-debug-audio/tests packages/deepctl-cmd-debug-browser/tests packages/deepctl-cmd-debug-network/tests packages/deepctl-cmd-debug-probe/tests packages/deepctl-cmd-ffprobe/tests packages/deepctl-cmd-mcp/tests packages/deepctl-cmd-update/tests packages/deepctl-cmd-plugin/tests packages/deepctl-cmd-skills/tests packages/deepctl-cmd-init/tests packages/deepctl-cmd-models/tests packages/deepctl-cmd-speak/tests packages/deepctl-cmd-keys/tests packages/deepctl-cmd-read/tests packages/deepctl-cmd-listen/tests packages/deepctl-cmd-requests/tests packages/deepctl-cmd-billing/tests packages/deepctl-cmd-members/tests packages/deepctl-cmd-completion/tests packages/deepctl-plugin-example/tests --cov --cov-report=term-missing -v
- name: Test CLI installation
run: |
uv run python -c "from deepctl.main import main; print('Import successful')"
uv run deepctl --version
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- name: Set up Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: "3.12"
- name: Install uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
- name: Install dependencies
run: uv sync --group testing --locked
- name: Check formatting
run: uv run ruff format --check src/ packages/*/src scripts/
- name: Lint
run: uv run ruff check src/ packages/*/src scripts/
- name: Type check
run: uv run mypy src/ packages/*/src
floors:
name: Dependency floors
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- name: Set up Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: "3.12"
# Root floors must equal workspace versions or `pip install --upgrade
# deepctl` (what `dg update` runs) silently skips the packages whose
# fixes the release advertises. See scripts/check_dependency_floors.py.
- name: Check dependency floors
run: make floors-check
build-test:
name: Test Build Process
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- name: Set up Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: "3.12"
- name: Install uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
- name: Install build dependencies
run: uv pip install --system build
- name: Test build process
run: make build
- name: Verify packages
run: make verify-packages
# Single rollup so branch protection needs exactly one required check.
# Requiring the matrix contexts directly means editing repo settings every
# time a Python version or OS is added or dropped, and a required context
# that stops reporting blocks every merge until someone notices.
#
# `if: always()` is load-bearing: without it this job is *skipped* when a
# prerequisite fails, and a skipped required check never reports failure --
# it just stalls. Run always, then fail on anything that is not success, so
# cancelled and skipped prerequisites are failures here too.
all-checks:
name: All checks
needs: [test, lint, floors, build-test]
if: always()
runs-on: ubuntu-latest
steps:
- name: Report prerequisite results
run: |
echo "test: ${{ needs.test.result }}"
echo "lint: ${{ needs.lint.result }}"
echo "floors: ${{ needs.floors.result }}"
echo "build-test: ${{ needs.build-test.result }}"
- name: Fail unless every prerequisite succeeded
if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') || contains(needs.*.result, 'skipped') }}
run: |
echo "::error::One or more required jobs did not succeed"
exit 1