@@ -147,6 +147,26 @@ jobs:
147147 python-version : " 3.13"
148148 - name : Install dependencies
149149 run : pip install -r sample-unity6/Tests/requirements-desktop.txt
150+ - name : Start AltTester Desktop (AltServer) headless on port 13000
151+ run : |
152+ ALT_APP="${ALTTESTER_DESKTOP_APP:-/Applications/AltTester Desktop.app}"
153+ if [ ! -d "$ALT_APP" ]; then
154+ echo "AltTester Desktop not found at $ALT_APP; install it so the app and driver can connect to port 13000."
155+ echo "See sample-unity6/Tests/README-ALTTESTER-MACOS.md"
156+ exit 1
157+ fi
158+ EXE="$ALT_APP/Contents/MacOS/AltTester Desktop"
159+ if [ ! -x "$EXE" ]; then
160+ echo "AltTester Desktop executable not found or not executable: $EXE"
161+ exit 1
162+ fi
163+ nohup "$EXE" -batchmode -port 13000 -nographics -logfile "${{ github.workspace }}/sample-unity6/Tests/alttester-desktop.log" &
164+ sleep 5
165+ if ! lsof -i :13000 >/dev/null 2>&1; then
166+ echo "AltServer did not bind to port 13000 within 5s; check alttester-desktop.log"
167+ exit 1
168+ fi
169+ echo "AltServer listening on port 13000"
150170 - name : Allow Unity app through macOS firewall for AltTester
151171 run : |
152172 APP_PATH="${{ github.workspace }}/sample-unity6/Tests/Sample Unity 6 macOS.app"
@@ -163,6 +183,11 @@ jobs:
163183 BROWSERSTACK_ACCESS_KEY : ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
164184 working-directory : sample-unity6/Tests
165185 run : pytest -xs test/test_mac.py::MacTest
186+ - name : Stop AltTester Desktop (AltServer)
187+ if : always()
188+ run : |
189+ PID=$(lsof -ti :13000) || true
190+ if [ -n "$PID" ]; then kill $PID 2>/dev/null || true; fi
166191 - name : Remove temporary keychain
167192 if : always()
168193 run : |
0 commit comments