hkblockchaintechnology commited on
Commit
783bfb0
·
verified ·
1 Parent(s): 0abcf88

Publish .github/ from marimo

Browse files
Files changed (1) hide show
  1. .github/workflows/live-desktop.yml +72 -0
.github/workflows/live-desktop.yml ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: live desktop
2
+
3
+ # Real-OS coverage for the parts a synthetic screenshot cannot reach: capture
4
+ # backends, native input, and DPI scaling. Linux runs the live test under Xvfb,
5
+ # Windows runs it on an interactive desktop session.
6
+ #
7
+ # Trigger it by hand from the Actions tab, or on every push to main.
8
+
9
+ on:
10
+ workflow_dispatch:
11
+ push:
12
+ branches: [main]
13
+
14
+ jobs:
15
+ linux-xvfb:
16
+ runs-on: ubuntu-latest
17
+ steps:
18
+ - uses: actions/checkout@v4
19
+ - uses: actions/setup-python@v5
20
+ with:
21
+ python-version: "3.12"
22
+ - name: Install system bits (virtual X server + tkinter)
23
+ run: sudo apt-get update && sudo apt-get install -y xvfb python3-tk
24
+ - name: Install the harness
25
+ run: python -m pip install -e ".[desktop,ocr,dev]"
26
+ - name: Unit suite (needs no display)
27
+ run: python -m pytest tests -q --no-header
28
+ - name: Live desktop test under Xvfb
29
+ run: |
30
+ Xvfb :99 -screen 0 1280x800x24 &
31
+ sleep 2
32
+ export DISPLAY=:99
33
+ python -m tiny_computer_agent --doctor --live || true
34
+ TINY_COMPUTER_AGENT_LIVE_TEST=1 python -m pytest tests/test_live_desktop.py -q -rA
35
+
36
+ windows:
37
+ runs-on: windows-latest
38
+ steps:
39
+ - uses: actions/checkout@v4
40
+ - uses: actions/setup-python@v5
41
+ with:
42
+ python-version: "3.12"
43
+ - name: Install the harness
44
+ run: python -m pip install -e ".[desktop,ocr,dev]"
45
+ - name: Preflight on real Windows
46
+ run: python -m tiny_computer_agent --doctor --live
47
+ - name: Unit suite
48
+ run: python -m pytest tests -q --no-header
49
+ - name: Live desktop test (real Windows desktop)
50
+ # continue-on-error on purpose: the first run tells us whether a hosted
51
+ # runner's session accepts injected input. Read the log either way.
52
+ continue-on-error: true
53
+ env:
54
+ TINY_COMPUTER_AGENT_LIVE_TEST: "1"
55
+ run: python -m pytest tests/test_live_desktop.py -q -rA
56
+
57
+ macos:
58
+ runs-on: macos-latest
59
+ # macOS gates screen capture and input behind Accessibility permissions that a
60
+ # hosted runner cannot grant, so this job only reports what it can: the doctor.
61
+ continue-on-error: true
62
+ steps:
63
+ - uses: actions/checkout@v4
64
+ - uses: actions/setup-python@v5
65
+ with:
66
+ python-version: "3.12"
67
+ - name: Install the harness
68
+ run: python -m pip install -e ".[desktop,ocr,dev]"
69
+ - name: Preflight on macOS
70
+ run: python -m tiny_computer_agent --doctor
71
+ - name: Unit suite
72
+ run: python -m pytest tests -q --no-header