chore: import upstream snapshot with attribution
CI: cua-driver distro-compat matrix / debian:12 (glibc 2.36) (push) Has been cancelled
CI: SPDX Headers / Check SPDX headers (warn-only) (push) Has been cancelled
CD: Docs MCP Server / build (linux/amd64) (push) Has been cancelled
CD: Docs MCP Server / build (linux/arm64) (push) Has been cancelled
CD: Docs MCP Server / merge (push) Has been cancelled
CI: cua-driver distro-compat matrix / Resolve release version (push) Has been cancelled
CI: cua-driver distro-compat matrix / fedora:41 (glibc 2.40) (push) Has been cancelled
CI: cua-driver distro-compat matrix / rockylinux:9 (glibc 2.34) (push) Has been cancelled
CI: cua-driver distro-compat matrix / ubuntu:22.04 (glibc 2.35) (push) Has been cancelled
CI: cua-driver distro-compat matrix / ubuntu:24.04 (glibc 2.39) (push) Has been cancelled
CI: cua-driver distro-compat matrix / Distro compat summary (push) Has been cancelled
CI: Rust Linux unit / Rust Linux unit and compile (push) Has been cancelled
CI: Rust Windows unit / Rust Windows unit and compile (push) Has been cancelled
CI: Nix Linux Rust source / Nix / compositor build (push) Has been cancelled
CI: Nix Linux Rust source / Nix / driver package (push) Has been cancelled
CI: Nix Linux Rust source / Nix / Rust unit tests (push) Has been cancelled
CI: cua-driver distro-compat matrix / debian:12 (glibc 2.36) (push) Has been cancelled
CI: SPDX Headers / Check SPDX headers (warn-only) (push) Has been cancelled
CD: Docs MCP Server / build (linux/amd64) (push) Has been cancelled
CD: Docs MCP Server / build (linux/arm64) (push) Has been cancelled
CD: Docs MCP Server / merge (push) Has been cancelled
CI: cua-driver distro-compat matrix / Resolve release version (push) Has been cancelled
CI: cua-driver distro-compat matrix / fedora:41 (glibc 2.40) (push) Has been cancelled
CI: cua-driver distro-compat matrix / rockylinux:9 (glibc 2.34) (push) Has been cancelled
CI: cua-driver distro-compat matrix / ubuntu:22.04 (glibc 2.35) (push) Has been cancelled
CI: cua-driver distro-compat matrix / ubuntu:24.04 (glibc 2.39) (push) Has been cancelled
CI: cua-driver distro-compat matrix / Distro compat summary (push) Has been cancelled
CI: Rust Linux unit / Rust Linux unit and compile (push) Has been cancelled
CI: Rust Windows unit / Rust Windows unit and compile (push) Has been cancelled
CI: Nix Linux Rust source / Nix / compositor build (push) Has been cancelled
CI: Nix Linux Rust source / Nix / driver package (push) Has been cancelled
CI: Nix Linux Rust source / Nix / Rust unit tests (push) Has been cancelled
This commit is contained in:
@@ -0,0 +1,94 @@
|
||||
name: "CI: Test Python"
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- "libs/python/**"
|
||||
- ".github/workflows/ci-test-python.yml"
|
||||
workflow_dispatch: # Allow manual trigger
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: Test ${{ matrix.package }}
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
fail-fast: false # Test all packages even if one fails
|
||||
matrix:
|
||||
package:
|
||||
- core
|
||||
- agent
|
||||
- computer
|
||||
- computer-server
|
||||
- mcp-server
|
||||
- som
|
||||
- cua-auto
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.12"
|
||||
|
||||
- name: Install uv
|
||||
run: |
|
||||
pip install uv
|
||||
|
||||
- name: Install package and dependencies
|
||||
run: |
|
||||
cd libs/python/${{ matrix.package }}
|
||||
# Install the package in editable mode with dev dependencies
|
||||
if [ -f pyproject.toml ]; then
|
||||
uv pip install --system -e .
|
||||
fi
|
||||
shell: bash
|
||||
|
||||
- name: Install test dependencies
|
||||
run: |
|
||||
# Install test dependencies from root pyproject.toml if tests directory exists
|
||||
# The root pyproject.toml has package=false, so we install just the dependency group
|
||||
if [ -d "libs/python/${{ matrix.package }}/tests" ]; then
|
||||
uv pip install --system --group test
|
||||
fi
|
||||
shell: bash
|
||||
|
||||
- name: Run tests
|
||||
run: |
|
||||
cd libs/python/${{ matrix.package }}
|
||||
if [ -d tests ]; then
|
||||
python -m pytest tests/ -v --tb=short --cov --cov-report=term --cov-report=xml
|
||||
else
|
||||
echo "No tests directory found, skipping tests"
|
||||
fi
|
||||
shell: bash
|
||||
env:
|
||||
CUA_TELEMETRY_ENABLED: "false" # Disable telemetry during tests
|
||||
|
||||
- name: Upload coverage to Codecov
|
||||
uses: codecov/codecov-action@v4
|
||||
if: always()
|
||||
with:
|
||||
file: ./libs/python/${{ matrix.package }}/coverage.xml
|
||||
flags: ${{ matrix.package }}
|
||||
name: codecov-${{ matrix.package }}
|
||||
fail_ci_if_error: false
|
||||
continue-on-error: true
|
||||
|
||||
summary:
|
||||
name: Test Summary
|
||||
runs-on: ubuntu-latest
|
||||
needs: test
|
||||
if: always()
|
||||
|
||||
steps:
|
||||
- name: Check test results
|
||||
run: |
|
||||
if [ "${{ needs.test.result }}" == "failure" ]; then
|
||||
echo "❌ Some tests failed. Please check the logs above."
|
||||
exit 1
|
||||
else
|
||||
echo "✅ All tests passed!"
|
||||
fi
|
||||
Reference in New Issue
Block a user