-
Notifications
You must be signed in to change notification settings - Fork 0
166 lines (138 loc) · 5.62 KB
/
Copy pathpython.yml
File metadata and controls
166 lines (138 loc) · 5.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
name: Python Tests (bindings + GUI accessibility)
on:
pull_request:
paths:
- "crates/**"
- "gui/**"
- "pytests/**"
- "pyproject.toml"
- "Cargo.toml"
- "Cargo.lock"
workflow_dispatch: {}
permissions:
contents: read
env:
CARGO_INCREMENTAL: 0
QT_ACCESSIBILITY: "1"
jobs:
bindings:
name: Bindings (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Map *.localhost prefixes to loopback (Unix)
if: runner.os != 'Windows'
run: echo "127.0.0.1 management.localhost scheduling.localhost" | sudo tee -a /etc/hosts
- name: Map *.localhost prefixes to loopback (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: Add-Content -Path "$env:SystemRoot\System32\drivers\etc\hosts" -Value "127.0.0.1 management.localhost scheduling.localhost"
- name: Build Rust workspace
run: cargo build --workspace
- name: Install Python deps + build extension
run: |
python -m pip install --upgrade pip
pip install maturin
python -c "import os; os.makedirs('deadline.data/scripts', exist_ok=True); open('deadline.data/scripts/deadline', 'w').close()"
pip install -e ".[test]"
- name: Run binding tests
run: python -m pytest pytests/bindings/ -v
ui-accessibility-linux:
name: GUI xa11y (Linux)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Map *.localhost prefixes to loopback
run: echo "127.0.0.1 management.localhost scheduling.localhost" | sudo tee -a /etc/hosts
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
xvfb dbus dbus-x11 at-spi2-core \
libxkbcommon-x11-0 libxcb-cursor0 libxcb-icccm4 \
libxcb-keysyms1 libxcb-image0 libxcb-render-util0 \
libxcb-xkb1 libegl1 libglib2.0-0 libfontconfig1 \
libdbus-1-3 libx11-xcb1 libxcb-render0 libxcb-shape0 \
libxcb-xfixes0
- name: Build Rust workspace
run: cargo build --workspace
- name: Install Python deps + build extension
run: |
python -m pip install --upgrade pip
pip install maturin
python -c "import os; os.makedirs('deadline.data/scripts', exist_ok=True); open('deadline.data/scripts/deadline', 'w').close()"
pip install -e ".[test]"
- name: Run xa11y tests under Xvfb + AT-SPI
run: |
dbus-run-session -- bash -c '
set -e
Xvfb :99 -screen 0 1280x1024x24 -ac &
export DISPLAY=:99
sleep 1
export QT_ACCESSIBILITY=1
export QT_LINUX_ACCESSIBILITY_ALWAYS_ON=1
/usr/libexec/at-spi-bus-launcher --launch-immediately &
sleep 1
/usr/libexec/at-spi2-registryd &
sleep 1
python -m pytest pytests/ui_accessibility/ -v --timeout=120
'
ui-accessibility-macos:
name: GUI xa11y (macOS)
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Map *.localhost prefixes to loopback
run: echo "127.0.0.1 management.localhost scheduling.localhost" | sudo tee -a /etc/hosts
- name: Build Rust workspace
run: cargo build --workspace
- name: Install Python deps + build extension
run: |
python -m pip install --upgrade pip
pip install maturin
python -c "import os; os.makedirs('deadline.data/scripts', exist_ok=True); open('deadline.data/scripts/deadline', 'w').close()"
pip install -e ".[test]"
- name: Grant accessibility TCC permission
run: |
PYTHON_PATH=$(python -c "import os,sys; print(os.path.realpath(sys.executable))")
sudo sqlite3 "/Library/Application Support/com.apple.TCC/TCC.db" \
"INSERT OR REPLACE INTO access(service,client,client_type,auth_value,auth_reason,auth_version,csreq,policy_id,indirect_object_identifier_type,indirect_object_identifier,indirect_object_code_identity,flags,last_modified) \
VALUES('kTCCServiceAccessibility','${PYTHON_PATH}',1,2,4,1,NULL,NULL,0,'UNUSED',NULL,0,$(date +%s));"
sudo launchctl stop com.apple.tccd 2>/dev/null || true
sleep 2
- name: Run xa11y tests
run: python -m pytest pytests/ui_accessibility/ -v --timeout=120
ui-accessibility-windows:
name: GUI xa11y (Windows)
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Map *.localhost prefixes to loopback
shell: pwsh
run: Add-Content -Path "$env:SystemRoot\System32\drivers\etc\hosts" -Value "127.0.0.1 management.localhost scheduling.localhost"
- name: Build Rust workspace
run: cargo build --workspace
- name: Install Python deps + build extension
run: |
python -m pip install --upgrade pip
pip install maturin
python -c "import os; os.makedirs('deadline.data/scripts', exist_ok=True); open('deadline.data/scripts/deadline', 'w').close()"
pip install -e ".[test]"
- name: Run xa11y tests
run: python -m pytest pytests/ui_accessibility/ -v --timeout=120