diff --git a/.github/workflows/platform-validation.yml b/.github/workflows/platform-validation.yml new file mode 100644 index 0000000..b4aa39b --- /dev/null +++ b/.github/workflows/platform-validation.yml @@ -0,0 +1,52 @@ +name: Platform Validation + +on: + push: + branches: + - main + pull_request: + +permissions: + contents: read + +jobs: + validate: + name: ${{ matrix.os }} / Python ${{ matrix.python-version }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - macos-latest + python-version: + - "3.10" + - "3.11" + - "3.12" + - "3.13" + + steps: + - name: Check out repository + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + + - name: Install development dependencies + run: python -m pip install -e ".[dev]" + + - name: Run unit tests + run: python -m unittest discover -s tests + + - name: Run capability diagnostics + run: python scripts/diagnose.py + + - name: Run process smoke tests + run: | + python examples/process_smoke.py + python examples/async_process_smoke.py + + - name: Build distribution artifacts + run: python -m build diff --git a/README.md b/README.md index 4b4ce93..bedc990 100644 --- a/README.md +++ b/README.md @@ -338,6 +338,27 @@ python examples/async_process_smoke.py They exercise hosted PowerShell, synchronous process-backed sessions, and async process-backed sessions. +## Platform Validation Matrix + +LiveShell's automated platform coverage focuses on the base package behavior that should work on both macOS and Linux without optional extras: + +| Platform | Python | Automated checks | +| --- | --- | --- | +| Linux | 3.10, 3.11, 3.12, 3.13 | `python -m unittest discover -s tests`, `python scripts/diagnose.py`, `python examples/process_smoke.py`, `python examples/async_process_smoke.py`, `python -m build` | +| macOS | 3.10, 3.11, 3.12, 3.13 | `python -m unittest discover -s tests`, `python scripts/diagnose.py`, `python examples/process_smoke.py`, `python examples/async_process_smoke.py`, `python -m build` | + +This matrix is enforced in GitHub Actions by the `Platform Validation` workflow in `.github/workflows/platform-validation.yml`. + +Hosted PowerShell remains an optional path because it requires both a local PowerShell installation and the `powershell` extra: + +```powershell +python -m pip install ".[powershell]" +python scripts/diagnose.py --preload +python examples/powershell_smoke.py +``` + +Run those hosted PowerShell checks manually on the target macOS/Linux machine when that optional integration matters for a release or deployment. + ## Behavior And Limitations Process-backed sessions such as `Cmd` and `Bash` keep one child process alive and send commands through it. They preserve shell state, but they are not full terminal or PTY emulators. diff --git a/scripts/diagnose.py b/scripts/diagnose.py index fc3d055..34108b3 100644 --- a/scripts/diagnose.py +++ b/scripts/diagnose.py @@ -31,7 +31,7 @@ def main() -> int: pythonnet_found = importlib.util.find_spec("pythonnet") is not None print(f"pythonnet installed: {pythonnet_found}") if not pythonnet_found: - print("Install with: python -m pip install -r requirements.txt") + print('Optional for hosted PowerShell: python -m pip install ".[powershell]"') installation = PowerShell.find_installation() print(f"PowerShell available: {installation is not None}")