Download .github/workflows/live-desktop.yml from hkblockchaintechnology/tiny-computer-agent: direct link, hf CLI and curl.
- Browser
- Download file 3.45 kB
-
https://huggingface.co/hkblockchaintechnology/tiny-computer-agent/resolve/main/.github/workflows/live-desktop.yml
- Command line
-
hf download hf://hkblockchaintechnology/tiny-computer-agent/.github/workflows/live-desktop.yml
-
curl -L -o live-desktop.yml https://huggingface.co/hkblockchaintechnology/tiny-computer-agent/resolve/main/.github/workflows/live-desktop.yml
3.45 kB
| name: live desktop + capability gallery | |
| # Real-OS coverage for the parts a synthetic screenshot cannot reach: capture | |
| # backends, native input, and DPI scaling. Linux runs the live test under Xvfb, | |
| # Windows runs it on an interactive desktop session. | |
| # | |
| # Trigger it by hand from the Actions tab, or on every push to main. | |
| # | |
| # The same jobs also build the capability gallery (showcase.py) on each real OS, | |
| # so the screenshots in the model card can be regenerated - including on Windows, | |
| # which the card itself was not built on. | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: [main] | |
| jobs: | |
| linux-xvfb: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install system bits (virtual X server + tkinter) | |
| run: sudo apt-get update && sudo apt-get install -y xvfb python3-tk | |
| - name: Install the harness | |
| run: python -m pip install -e ".[desktop,ocr,dev]" | |
| - name: Unit suite (needs no display) | |
| run: python -m pytest tests -q --no-header | |
| - name: Live desktop test under Xvfb | |
| run: | | |
| Xvfb :99 -screen 0 1280x800x24 & | |
| sleep 2 | |
| export DISPLAY=:99 | |
| python -m tiny_computer_agent --doctor --live || true | |
| TINY_COMPUTER_AGENT_LIVE_TEST=1 python -m pytest tests/test_live_desktop.py -q -rA | |
| - name: Capability gallery on a real X server | |
| run: | | |
| export DISPLAY=:99 | |
| python showcase.py | |
| - name: Upload the Linux gallery | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: gallery-linux | |
| path: gallery/*.png | |
| windows: | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install the harness | |
| run: python -m pip install -e ".[desktop,ocr,dev]" | |
| - name: Preflight on real Windows | |
| run: python -m tiny_computer_agent --doctor --live | |
| - name: Unit suite | |
| run: python -m pytest tests -q --no-header | |
| - name: Live desktop test (real Windows desktop) | |
| # continue-on-error on purpose: the first run tells us whether a hosted | |
| # runner's session accepts injected input. Read the log either way. | |
| continue-on-error: true | |
| env: | |
| TINY_COMPUTER_AGENT_LIVE_TEST: "1" | |
| run: python -m pytest tests/test_live_desktop.py -q -rA | |
| - name: Capability gallery on a real Windows desktop | |
| # The point of this job: the same showcase.py, on Windows pixels. | |
| continue-on-error: true | |
| run: python showcase.py | |
| - name: Upload the Windows gallery | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: gallery-windows | |
| path: gallery/*.png | |
| macos: | |
| runs-on: macos-latest | |
| # macOS gates screen capture and input behind Accessibility permissions that a | |
| # hosted runner cannot grant, so this job only reports what it can: the doctor. | |
| continue-on-error: true | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install the harness | |
| run: python -m pip install -e ".[desktop,ocr,dev]" | |
| - name: Preflight on macOS | |
| run: python -m tiny_computer_agent --doctor | |
| - name: Unit suite | |
| run: python -m pytest tests -q --no-header | |