Skip to content

add bundled cli to python #16

add bundled cli to python

add bundled cli to python #16

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
name: Build CLI
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Build
run: cargo build --release
- name: Upload CLI artifact
uses: actions/upload-artifact@v4
with:
name: pg0-macos
path: target/release/pg0
sdk-tests:
name: SDK Tests (macOS)
needs: build
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Download CLI
uses: actions/download-artifact@v4
with:
name: pg0-macos
path: ~/.local/bin
- name: Make CLI executable
run: chmod +x ~/.local/bin/pg0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install uv
uses: astral-sh/setup-uv@v4
- name: Run Python SDK tests
working-directory: sdk/python
run: |
export PATH="$HOME/.local/bin:$PATH"
uv pip install --system -e ".[dev]"
pytest tests/ -v
# Docker tests - one job per platform, runs both CLI and Python SDK tests
# Note: ARM64 tests are skipped because QEMU emulation is too slow for PostgreSQL setup
docker-tests:
name: Docker Tests (${{ matrix.platform }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- platform: debian-amd64
cli_script: docker-tests/test_debian_amd64.sh
python_script: docker-tests/python/test_debian_amd64.sh
- platform: alpine-amd64
cli_script: docker-tests/test_alpine_amd64.sh
python_script: docker-tests/python/test_alpine_amd64.sh
steps:
- uses: actions/checkout@v4
- name: Run CLI Docker test
run: |
chmod +x ${{ matrix.cli_script }}
bash ${{ matrix.cli_script }}
- name: Run Python SDK Docker test
run: |
chmod +x ${{ matrix.python_script }}
bash ${{ matrix.python_script }}
# Python wheel builds - test that wheel building works
python-wheels:
name: Python Wheels
uses: ./.github/workflows/build-python-wheels.yml
with:
upload-artifacts: false
test-wheels: true