Skip to content

Refactor Chat to ACP-Native Subpackage with Deep Agents Provider #175

Refactor Chat to ACP-Native Subpackage with Deep Agents Provider

Refactor Chat to ACP-Native Subpackage with Deep Agents Provider #175

Workflow file for this run

name: Test pywry
on:
push:
branches: [main, master, develop]
paths:
- 'pywry/**'
- '!pywry/docs/**'
- '!pywry/**/*.md'
- '.github/workflows/test-pywry.yml'
pull_request:
branches: [main, master, develop]
paths:
- 'pywry/**'
- '!pywry/docs/**'
- '!pywry/**/*.md'
- '.github/workflows/test-pywry.yml'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
defaults:
run:
working-directory: pywry
jobs:
lint:
name: Lint
runs-on: ubuntu-24.04
permissions:
contents: read
steps:
- uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.12'
cache: 'pip'
cache-dependency-path: pywry/pyproject.toml
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"
- name: Run Ruff linter
run: ruff check pywry/ tests/
- name: Run Ruff formatter check
run: ruff format --check pywry/ tests/
- name: Run Mypy type checker
run: mypy pywry/
- name: Run Pylint
run: pylint pywry/ --exit-zero --output-format=colorized
test:
name: Test - ${{ matrix.os }} - Python ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
permissions:
contents: read
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-24.04
python-version: '3.10'
- os: ubuntu-24.04
python-version: '3.14'
- os: windows-2025
python-version: '3.10'
- os: windows-2025
python-version: '3.14'
- os: macos-15
python-version: '3.10'
- os: macos-15
python-version: '3.14'
- os: ubuntu-24.04-arm
python-version: '3.11'
- os: ubuntu-24.04-arm
python-version: '3.14'
- os: windows-11-arm
python-version: '3.12'
- os: windows-11-arm
python-version: '3.14'
- os: macos-latest
python-version: '3.10'
- os: macos-latest
python-version: '3.14'
steps:
- uses: actions/checkout@v5
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
cache: 'pip'
cache-dependency-path: pywry/pyproject.toml
- name: Set up Rust (Linux only)
if: runner.os == 'Linux'
uses: dtolnay/rust-toolchain@stable
- name: Set up Rust (Windows ARM64)
if: runner.os == 'Windows' && runner.arch == 'ARM64'
uses: dtolnay/rust-toolchain@stable
with:
targets: aarch64-pc-windows-msvc
- name: Install Linux dependencies
if: runner.os == 'Linux'
run: |
for i in 1 2 3; do sudo apt-get update && break || sleep 15; done
for i in 1 2 3; do sudo apt-get install -y --fix-missing xvfb dbus-x11 at-spi2-core libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xfixes0 libxcb-shape0 libgl1 libegl1 libwebkit2gtk-4.1-dev libgtk-3-dev && break || { sleep 30; sudo apt-get update; }; done
- name: Cache vcpkg packages (Windows ARM)
if: runner.os == 'Windows' && runner.arch == 'ARM64'
uses: actions/cache@v5
with:
path: C:/vcpkg/installed
key: vcpkg-arm64-windows-openssl-static-md-lua-${{ hashFiles('.github/workflows/test-pywry.yml') }}
restore-keys: |
vcpkg-arm64-windows-openssl-static-md-lua-
- name: Install OpenSSL via vcpkg (Windows ARM)
if: runner.os == 'Windows' && runner.arch == 'ARM64'
shell: pwsh
run: |
$env:VCPKG_ROOT = "$env:VCPKG_INSTALLATION_ROOT"
& "$env:VCPKG_ROOT\vcpkg" install openssl:arm64-windows-static-md
$opensslDir = "$env:VCPKG_ROOT\installed\arm64-windows-static-md"
echo "OPENSSL_DIR=$opensslDir" >> $env:GITHUB_ENV
echo "OPENSSL_LIB_DIR=$opensslDir\lib" >> $env:GITHUB_ENV
echo "OPENSSL_INCLUDE_DIR=$opensslDir\include" >> $env:GITHUB_ENV
- name: Setup build environment (Windows ARM)
if: runner.os == 'Windows' && runner.arch == 'ARM64'
shell: pwsh
run: |
$buildTemp = "C:\buildtmp"
New-Item -ItemType Directory -Force -Path $buildTemp | Out-Null
echo "TMP=$buildTemp" >> $env:GITHUB_ENV
echo "TEMP=$buildTemp" >> $env:GITHUB_ENV
$env:VCPKG_ROOT = "$env:VCPKG_INSTALLATION_ROOT"
& "$env:VCPKG_ROOT\vcpkg" install lua:arm64-windows
$luaDir = "$env:VCPKG_ROOT\installed\arm64-windows"
echo "LUA_DIR=$luaDir" >> $env:GITHUB_ENV
echo "LUA_LIB=$luaDir\lib" >> $env:GITHUB_ENV
echo "LUA_INC=$luaDir\include" >> $env:GITHUB_ENV
- name: Build cryptography from source (Windows ARM)
if: runner.os == 'Windows' && runner.arch == 'ARM64'
shell: pwsh
run: |
pip install --no-cache-dir --no-binary=cryptography cryptography
python -c "from cryptography.hazmat.bindings._rust import openssl; print('cryptography OK')"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"
- name: Verify Docker (Linux)
if: runner.os == 'Linux'
run: docker version
- name: Setup Docker (macOS Intel)
id: docker-macos
if: runner.os == 'macOS' && runner.arch == 'X64'
uses: docker/setup-docker-action@v4
- name: Verify Docker (macOS Intel)
if: runner.os == 'macOS' && runner.arch == 'X64'
run: |
echo "DOCKER_HOST=$DOCKER_HOST"
docker version
- name: Run tests (Linux)
if: runner.os == 'Linux'
env:
PYWRY_HEADLESS: "1"
NO_AT_BRIDGE: "1"
run: |
dbus-run-session -- xvfb-run --auto-servernum --server-args="-screen 0 1920x1080x24" python -m pytest -c pytest.ini tests/ -v --tb=short
- name: Run tests (Windows x64)
if: runner.os == 'Windows' && runner.arch == 'X64'
env:
PYWRY_HEADLESS: "1"
PYWRY_DEPLOY__STATE_BACKEND: "memory"
PYTHONUTF8: "1"
run: |
python -m pytest -c pytest.ini tests/ -v --tb=short --ignore=tests/test_state_redis_integration.py --ignore=tests/test_auth_rbac_integration.py --ignore=tests/test_deploy_mode_integration.py --ignore=tests/test_e2e_deploy_mode.py --ignore=tests/test_e2e_rbac_widgets.py -m "not redis and not container"
- name: Run tests (Windows ARM)
if: runner.os == 'Windows' && runner.arch == 'ARM64'
env:
PYWRY_HEADLESS: "1"
PYWRY_DEPLOY__STATE_BACKEND: "memory"
PYTHONUTF8: "1"
run: |
python -m pytest -c pytest.ini tests/ -v --tb=short --ignore=tests/test_state_redis_integration.py --ignore=tests/test_auth_rbac_integration.py --ignore=tests/test_deploy_mode_integration.py --ignore=tests/test_e2e_deploy_mode.py --ignore=tests/test_e2e_rbac_widgets.py --ignore=tests/test_inline_ssl.py -m "not redis and not container"
- name: Run tests (macOS Intel)
if: runner.os == 'macOS' && runner.arch == 'X64'
env:
PYWRY_HEADLESS: "1"
run: |
python -m pytest -c pytest.ini tests/ -v --tb=short
- name: Run tests (macOS ARM)
if: runner.os == 'macOS' && runner.arch == 'ARM64'
env:
PYWRY_HEADLESS: "1"
PYWRY_DEPLOY__STATE_BACKEND: "memory"
run: |
python -m pytest -c pytest.ini tests/ -v --tb=short --ignore=tests/test_state_redis_integration.py --ignore=tests/test_auth_rbac_integration.py --ignore=tests/test_deploy_mode_integration.py --ignore=tests/test_e2e_deploy_mode.py --ignore=tests/test_e2e_rbac_widgets.py -m "not redis and not container"