@@ -315,6 +315,10 @@ jobs:
315315 } else {
316316 pip install -r sample/Tests/requirements-desktop.txt
317317 }
318+ - name : Kill leftover Brave processes
319+ if : always()
320+ run : |
321+ Get-Process | Where-Object { $_.Name -like "*brave*" -or $_.Name -eq "chromedriver" } | Stop-Process -Force -ErrorAction SilentlyContinue
318322 - name : Run UI tests
319323 env :
320324 UNITY_APP_PATH : Sample Unity 6 Windows.exe
@@ -324,6 +328,10 @@ jobs:
324328 BROWSERSTACK_ACCESS_KEY : ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
325329 working-directory : sample-unity6/Tests
326330 run : python -m pytest -xs test/test_windows.py::WindowsTest
331+ - name : Close Brave Browser
332+ if : always()
333+ run : |
334+ Get-Process | Where-Object { $_.Name -like "*brave*" -or $_.Name -eq "chromedriver" } | Stop-Process -Force -ErrorAction SilentlyContinue
327335 - name : Upload build log
328336 if : always()
329337 uses : actions/upload-artifact@v4
@@ -334,6 +342,7 @@ jobs:
334342 test :
335343 name : Run ${{ matrix.targetPlatform }} UI tests 🧪
336344 needs : build
345+ if : ${{ !cancelled() }}
337346 strategy :
338347 fail-fast : false
339348 matrix :
@@ -396,6 +405,10 @@ jobs:
396405 - name : Install dependencies (Mac)
397406 if : contains(matrix.targetPlatform, 'StandaloneOSX') && (github.event_name != 'workflow_dispatch' || github.event.inputs.targetPlatform == 'All' || github.event.inputs.targetPlatform == matrix.targetPlatform)
398407 run : pip install -r "${{ matrix.projectPath }}/Tests/requirements-desktop.txt"
408+ - name : Kill leftover Brave processes (Windows)
409+ if : matrix.targetPlatform == 'StandaloneWindows64' && always()
410+ run : |
411+ Get-Process | Where-Object { $_.Name -like "*brave*" -or $_.Name -eq "chromedriver" } | Stop-Process -Force -ErrorAction SilentlyContinue
399412 - name : Run UI tests
400413 if : github.event_name != 'workflow_dispatch' || github.event.inputs.targetPlatform == 'All' || github.event.inputs.targetPlatform == matrix.targetPlatform
401414 env :
@@ -406,12 +419,16 @@ jobs:
406419 BROWSERSTACK_ACCESS_KEY : ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
407420 working-directory : ${{ matrix.projectPath }}/Tests
408421 run : ${{ matrix.test_script }}
409- - name : Close Brave Browser
422+ - name : Close Brave Browser (macOS)
410423 if : contains(matrix.targetPlatform, 'StandaloneOSX') && always()
411424 run : |
412425 osascript -e 'tell application "Brave Browser" to quit' 2>/dev/null || true
413426 sleep 2
414427 pkill -f "Brave Browser" 2>/dev/null || true
428+ - name : Close Brave Browser (Windows)
429+ if : matrix.targetPlatform == 'StandaloneWindows64' && always()
430+ run : |
431+ Get-Process | Where-Object { $_.Name -like "*brave*" -or $_.Name -eq "chromedriver" } | Stop-Process -Force -ErrorAction SilentlyContinue
415432 - name : Remove temporary keychain
416433 if : contains(matrix.targetPlatform, 'StandaloneOSX') && (github.event_name != 'workflow_dispatch' || github.event.inputs.targetPlatform == 'All' || github.event.inputs.targetPlatform == matrix.targetPlatform)
417434 run : |
0 commit comments