File tree Expand file tree Collapse file tree 3 files changed +26
-6
lines changed Expand file tree Collapse file tree 3 files changed +26
-6
lines changed Original file line number Diff line number Diff line change @@ -73,19 +73,17 @@ jobs:
73
73
- uses : actions/download-artifact@v4
74
74
with :
75
75
name : Build-${{ matrix.targetPlatform }}
76
+ path : sample/Tests
76
77
- uses : actions/setup-python@v4
77
78
with :
78
79
python-version : " 3.10"
79
80
- name : Install dependencies
80
81
run : pip install -r "sample/Tests/requirements.txt"
81
82
- name : Run UI tests
82
83
env :
83
- UNITY_APP_PATH : ${{ github.workspace }}/ SampleApp.app
84
+ UNITY_APP_PATH : SampleApp.app
84
85
UNITY_APP_NAME : SampleApp
85
86
MAILSLURP_API_KEY : ${{ secrets.MAILSLURP_API_KEY }}
86
87
working-directory : sample/Tests
87
- run : |
88
- chmod -R 755 ${{ github.workspace }}/SampleApp.app
89
- chmod +x ${{ matrix.test_script }}
90
- ./${{ matrix.test_script }}
88
+ run : ./${{ matrix.test_script }}
91
89
Original file line number Diff line number Diff line change
1
+ param (
2
+ [string ]$appName
3
+ )
4
+
5
+ Add-Type @"
6
+ using System;
7
+ using System.Runtime.InteropServices;
8
+ public class User32 {
9
+ [DllImport("user32.dll")]
10
+ public static extern IntPtr FindWindow(string lpClassName, string lpWindowName);
11
+ [DllImport("user32.dll")]
12
+ [return: MarshalAs(UnmanagedType.Bool)]
13
+ public static extern bool SetForegroundWindow(IntPtr hWnd);
14
+ }
15
+ "@
16
+
17
+ $hWnd = [User32 ]::FindWindow([NullString ]::Value, $appName )
18
+ if ($hWnd -ne [IntPtr ]::Zero) {
19
+ [User32 ]::SetForegroundWindow($hWnd ) | Out-Null
20
+ } else {
21
+ Write-Output " Window not found"
22
+ }
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ function Stop-SampleApp {
13
13
# Function to start the Unity sample app
14
14
function Start-SampleApp {
15
15
Write-Output " Starting Unity sample app..."
16
- Start-Process - FilePath " build\output\Windows64\ SampleApp.exe"
16
+ Start-Process - FilePath " SampleApp.exe"
17
17
Start-Sleep - Seconds 10
18
18
}
19
19
You can’t perform that action at this time.
0 commit comments