okami.mom/strata

git clone https://git.nkp.pet/okami.mom/strata

Niko1221terminal: strata_cli, strata_control, bin/strata and the terminal tests64a91dcdc

main
3.8 KiB115 linesraw
1name: Portable monitor client
2
3on:
4  push:
5    paths:
6      - .github/workflows/terminal-portable-monitor.yml
7      - packaging/monitor_bundle.py
8      - strata.py
9      - strata_cli/**
10      - strata_control/**
11      - tools/minimal_cli_smoke.py
12      - tools/portable_monitor_smoke.py
13      - tools/portable_monitor_pty_smoke.py
14      - requirements-monitor.txt
15      - LICENSE
16  pull_request:
17    paths:
18      - .github/workflows/terminal-portable-monitor.yml
19      - packaging/monitor_bundle.py
20      - strata.py
21      - strata_cli/**
22      - strata_control/**
23      - tools/minimal_cli_smoke.py
24      - tools/portable_monitor_smoke.py
25      - tools/portable_monitor_pty_smoke.py
26      - requirements-monitor.txt
27      - LICENSE
28  workflow_dispatch:
29
30permissions:
31  contents: read
32
33jobs:
34  client:
35    name: ${{ matrix.os }} / Python ${{ matrix.python }}
36    runs-on: ${{ matrix.os }}
37    strategy:
38      fail-fast: false
39      matrix:
40        os: [ubuntu-latest, windows-latest]
41        python: ['3.10', '3.11']
42    steps:
43      - uses: actions/checkout@v7
44        with:
45          persist-credentials: false
46      - uses: actions/setup-python@v7
47        with:
48          python-version: ${{ matrix.python }}
49      - name: Check source CLI without optional packages
50        shell: bash
51        run: |
52          python - <<'PY'
53          import os
54          import subprocess
55          import sys
56          from pathlib import Path
57
58          report = Path(os.environ['RUNNER_TEMP']) / 'minimal-cli-smoke.json'
59          subprocess.run([sys.executable, 'tools/minimal_cli_smoke.py',
60                          '--report', str(report)], check=True)
61          print(report.read_text())
62          PY
63      - name: Build and smoke test without site packages
64        shell: bash
65        run: |
66          python - <<'PY'
67          import os
68          import subprocess
69          import sys
70          from pathlib import Path
71
72          bundle = Path(os.environ['RUNNER_TEMP']) / 'strata-monitor.pyz'
73          report = bundle.with_name('monitor-stdlib-smoke.json')
74          subprocess.run([sys.executable, 'packaging/monitor_bundle.py',
75                          'build', str(bundle)], check=True)
76          subprocess.run([sys.executable, 'tools/portable_monitor_smoke.py',
77                          '--bundle', str(bundle), '--report', str(report)], check=True)
78          print(report.read_text())
79          PY
80      - name: Install optional Textual dependency
81        if: matrix.python == '3.11'
82        run: python -m pip install -r requirements-monitor.txt
83      - name: Smoke test packaged interactive Overview
84        if: matrix.python == '3.11'
85        shell: bash
86        run: |
87          python - <<'PY'
88          import os
89          import subprocess
90          import sys
91          from pathlib import Path
92
93          bundle = Path(os.environ['RUNNER_TEMP']) / 'strata-monitor.pyz'
94          report = bundle.with_name('monitor-interactive-smoke.json')
95          subprocess.run([sys.executable, 'tools/portable_monitor_smoke.py',
96                          '--bundle', str(bundle), '--interactive',
97                          '--report', str(report)], check=True)
98          print(report.read_text())
99          PY
100      - name: Check POSIX terminal restoration
101        if: matrix.os == 'ubuntu-latest' && matrix.python == '3.11'
102        shell: bash
103        run: |
104          python - <<'PY'
105          import os
106          import subprocess
107          import sys
108          from pathlib import Path
109
110          bundle = Path(os.environ['RUNNER_TEMP']) / 'strata-monitor.pyz'
111          report = bundle.with_name('monitor-pty-smoke.json')
112          subprocess.run([sys.executable, 'tools/portable_monitor_pty_smoke.py',
113                          '--bundle', str(bundle), '--report', str(report)], check=True)
114          print(report.read_text())
115          PY