name: Portable monitor client on: push: paths: - .github/workflows/terminal-portable-monitor.yml - packaging/monitor_bundle.py - strata.py - strata_cli/** - strata_control/** - tools/minimal_cli_smoke.py - tools/portable_monitor_smoke.py - tools/portable_monitor_pty_smoke.py - requirements-monitor.txt - LICENSE pull_request: paths: - .github/workflows/terminal-portable-monitor.yml - packaging/monitor_bundle.py - strata.py - strata_cli/** - strata_control/** - tools/minimal_cli_smoke.py - tools/portable_monitor_smoke.py - tools/portable_monitor_pty_smoke.py - requirements-monitor.txt - LICENSE workflow_dispatch: permissions: contents: read jobs: client: name: ${{ matrix.os }} / Python ${{ matrix.python }} runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: os: [ubuntu-latest, windows-latest] python: ['3.10', '3.11'] steps: - uses: actions/checkout@v7 with: persist-credentials: false - uses: actions/setup-python@v7 with: python-version: ${{ matrix.python }} - name: Check source CLI without optional packages shell: bash run: | python - <<'PY' import os import subprocess import sys from pathlib import Path report = Path(os.environ['RUNNER_TEMP']) / 'minimal-cli-smoke.json' subprocess.run([sys.executable, 'tools/minimal_cli_smoke.py', '--report', str(report)], check=True) print(report.read_text()) PY - name: Build and smoke test without site packages shell: bash run: | python - <<'PY' import os import subprocess import sys from pathlib import Path bundle = Path(os.environ['RUNNER_TEMP']) / 'strata-monitor.pyz' report = bundle.with_name('monitor-stdlib-smoke.json') subprocess.run([sys.executable, 'packaging/monitor_bundle.py', 'build', str(bundle)], check=True) subprocess.run([sys.executable, 'tools/portable_monitor_smoke.py', '--bundle', str(bundle), '--report', str(report)], check=True) print(report.read_text()) PY - name: Install optional Textual dependency if: matrix.python == '3.11' run: python -m pip install -r requirements-monitor.txt - name: Smoke test packaged interactive Overview if: matrix.python == '3.11' shell: bash run: | python - <<'PY' import os import subprocess import sys from pathlib import Path bundle = Path(os.environ['RUNNER_TEMP']) / 'strata-monitor.pyz' report = bundle.with_name('monitor-interactive-smoke.json') subprocess.run([sys.executable, 'tools/portable_monitor_smoke.py', '--bundle', str(bundle), '--interactive', '--report', str(report)], check=True) print(report.read_text()) PY - name: Check POSIX terminal restoration if: matrix.os == 'ubuntu-latest' && matrix.python == '3.11' shell: bash run: | python - <<'PY' import os import subprocess import sys from pathlib import Path bundle = Path(os.environ['RUNNER_TEMP']) / 'strata-monitor.pyz' report = bundle.with_name('monitor-pty-smoke.json') subprocess.run([sys.executable, 'tools/portable_monitor_pty_smoke.py', '--bundle', str(bundle), '--report', str(report)], check=True) print(report.read_text()) PY