chore: unity 6 sample app for windows #929
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| name: UI Tests 🧪 | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| targetPlatform: | |
| description: "Select the platform to build and test" | |
| required: true | |
| default: "All" | |
| type: choice | |
| options: | |
| - All | |
| - StandaloneOSX # Builds Unity 2021 macOS only | |
| - StandaloneOSX-Unity6 # Builds Unity 6 macOS only | |
| - StandaloneWindows64 # Builds Unity 2021 Windows only | |
| - StandaloneWindows64-Unity6 # Builds Unity 6 Windows only | |
| # - Android | |
| # - iOS | |
| push: | |
| branches: [main] | |
| pull_request: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| name: Build ${{ matrix.targetPlatform }} for AltTester 🛠️ | |
| runs-on: ubuntu-latest-8-cores | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - targetPlatform: StandaloneOSX | |
| buildMethod: MacBuilder.BuildForAltTester | |
| buildPath: sample/Builds/MacOS | |
| projectPath: sample | |
| unityVersion: 2021.3.26f1 | |
| - targetPlatform: StandaloneWindows64 | |
| buildMethod: WindowsBuilder.BuildForAltTester | |
| buildPath: sample/Builds/Windows64 | |
| projectPath: sample | |
| unityVersion: 2021.3.26f1 | |
| # - targetPlatform: Android | |
| # buildMethod: MobileBuilder.BuildForAltTester | |
| # buildPath: sample/Builds/Android | |
| # projectPath: sample | |
| # unityVersion: 2021.3.26f1 | |
| steps: | |
| - uses: actions/checkout@v3 | |
| if: github.event_name != 'workflow_dispatch' || github.event.inputs.targetPlatform == 'All' || github.event.inputs.targetPlatform == matrix.targetPlatform | |
| with: | |
| lfs: true | |
| - uses: actions/cache@v3 | |
| if: github.event_name != 'workflow_dispatch' || github.event.inputs.targetPlatform == 'All' || github.event.inputs.targetPlatform == matrix.targetPlatform | |
| with: | |
| path: Library | |
| key: Library-${{ matrix.targetPlatform }}-${{ hashFiles(format('{0}/Assets/**', matrix.projectPath), format('{0}/Packages/**', matrix.projectPath), format('{0}/ProjectSettings/**', matrix.projectPath)) }} | |
| restore-keys: | | |
| Library-${{ matrix.targetPlatform }} | |
| Library- | |
| - name: Build project | |
| if: github.event_name != 'workflow_dispatch' || github.event.inputs.targetPlatform == 'All' || github.event.inputs.targetPlatform == matrix.targetPlatform | |
| uses: game-ci/unity-builder@v4 | |
| env: | |
| UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} | |
| UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} | |
| UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }} | |
| with: | |
| targetPlatform: ${{ contains(matrix.targetPlatform, 'Unity6') && 'StandaloneOSX' || matrix.targetPlatform }} | |
| projectPath: ${{ matrix.projectPath }} | |
| unityVersion: ${{ matrix.unityVersion }} | |
| buildMethod: ${{ matrix.buildMethod }} | |
| customParameters: -logFile logFile.log -quit -batchmode | |
| artifactsPath: ${{ matrix.buildPath }} | |
| - name: Ensure build path exists | |
| if: github.event_name != 'workflow_dispatch' || github.event.inputs.targetPlatform == 'All' || github.event.inputs.targetPlatform == matrix.targetPlatform | |
| run: mkdir -p ${{ matrix.buildPath }} | |
| - name: Upload artifact | |
| if: github.event_name != 'workflow_dispatch' || github.event.inputs.targetPlatform == 'All' || github.event.inputs.targetPlatform == matrix.targetPlatform | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: Build-${{ matrix.targetPlatform }} | |
| path: ${{ matrix.buildPath }} | |
| build-and-test-unity6-macos: # Unity 6 requires a full build cycle to compile AltTester packages properly. This doesn't work well in Game CI, so we have to build it manually. | |
| name: Build & Test Unity 6 macOS 🛠️🧪 | |
| runs-on: [self-hosted, macOS] | |
| concurrency: | |
| group: ui-tests-email-inbox-macos-unity6 | |
| cancel-in-progress: false # Let tests complete rather than cancelling | |
| if: github.event_name != 'workflow_dispatch' || github.event.inputs.targetPlatform == 'All' || github.event.inputs.targetPlatform == 'StandaloneOSX-Unity6' | |
| steps: | |
| - name: Cleanup old builds | |
| run: | | |
| # Remove previous build to save space | |
| rm -rf sample-unity6/Tests/* 2>/dev/null || true | |
| - uses: actions/checkout@v3 | |
| with: | |
| lfs: true | |
| - name: Setup symlinks for Unity 6 macOS | |
| run: ./setup-symlinks.sh | |
| - name: Force clean package resolution | |
| run: | | |
| echo "Removing Library folder to force clean package resolution..." | |
| rm -rf sample-unity6/Library | |
| echo "✅ Library folder removed" | |
| - name: First build (resolves packages) | |
| run: | | |
| echo "Running first build to trigger package resolution..." | |
| export TMPDIR="/Users/svc_buildsdk/tmp" | |
| mkdir -p "$TMPDIR" | |
| mkdir -p sample-unity6/Tests | |
| /Applications/Unity/Hub/Editor/6000.0.58f2/Unity.app/Contents/MacOS/Unity -projectPath "${{ github.workspace }}/sample-unity6" -executeMethod "MacBuilderUnity6.BuildForAltTester" -logFile "${{ github.workspace }}/sample-unity6/first-build-log.txt" -quit -batchmode --buildPath "${{ github.workspace }}/sample-unity6/Tests/Sample Unity 6 macOS" || true | |
| echo "First build completed (may have failed, that's ok). Checking for AltTester..." | |
| if ls -la "${{ github.workspace }}/sample-unity6/Library/PackageCache/" | grep alttester; then | |
| echo "✅ AltTester found in PackageCache after first build" | |
| else | |
| echo "⚠️ AltTester not found yet, but will be ready for second build" | |
| fi | |
| - name: Build Unity 6 macOS with command line (second build with packages ready) | |
| run: | | |
| echo "Building Unity 6 macOS using command line..." | |
| export TMPDIR="/Users/svc_buildsdk/tmp" | |
| mkdir -p "$TMPDIR" | |
| mkdir -p sample-unity6/Tests | |
| /Applications/Unity/Hub/Editor/6000.0.58f2/Unity.app/Contents/MacOS/Unity -projectPath "${{ github.workspace }}/sample-unity6" -executeMethod "MacBuilderUnity6.BuildForAltTester" -logFile "${{ github.workspace }}/sample-unity6/build-log.log" -quit -batchmode --buildPath "${{ github.workspace }}/sample-unity6/Tests/Sample Unity 6 macOS" | |
| echo "Build completed. Checking for build output..." | |
| ls -la sample-unity6/Tests/ | |
| - name: Create temporary keychain | |
| run: | | |
| security list-keychains | |
| security delete-keychain temporary || true | |
| security list-keychains | |
| security create-keychain -p "" temporary | |
| security default-keychain -s temporary | |
| security unlock-keychain -p "" temporary | |
| security set-keychain-settings -lut 600 temporary | |
| - name: Make macOS artifact executable | |
| run: chmod -R +x 'sample-unity6/Tests/Sample Unity 6 macOS.app/Contents/MacOS' | |
| - uses: actions/setup-python@v4 | |
| with: | |
| python-version: "3.13" | |
| - name: Install dependencies | |
| run: pip install -r sample-unity6/Tests/requirements-desktop.txt | |
| - name: Run UI tests | |
| env: | |
| UNITY_APP_PATH: Sample Unity 6 macOS.app | |
| UNITY_APP_NAME: Sample Unity 6 macOS | |
| MAILSLURP_API_KEY: ${{ secrets.MAILSLURP_API_KEY }} | |
| BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }} | |
| BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }} | |
| working-directory: sample-unity6/Tests | |
| run: pytest -xs test/test_mac.py::MacTest | |
| - name: Remove temporary keychain | |
| if: always() | |
| run: | | |
| security list-keychains | |
| security delete-keychain temporary | |
| security default-keychain -s ~/Library/Keychains/login.keychain-db | |
| security list-keychains -d user -s ~/Library/Keychains/login.keychain-db | |
| security list-keychains | |
| - name: Upload first build log | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: Unity6-First-Build-Log | |
| path: sample-unity6/first-build-log.txt | |
| - name: Upload build log | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: Unity6-macOS-Build-Log | |
| path: sample-unity6/build-log.log | |
| build-and-test-unity6-windows: # Unity 6 requires a full build cycle to compile AltTester packages properly. This doesn't work well in Game CI, so we have to build it manually. | |
| name: Build & Test Unity 6 Windows 🛠️🧪 | |
| runs-on: [self-hosted, windows] | |
| concurrency: | |
| group: ui-tests-email-inbox-windows-unity6 | |
| cancel-in-progress: false # Let tests complete rather than cancelling | |
| if: github.event_name != 'workflow_dispatch' || github.event.inputs.targetPlatform == 'All' || github.event.inputs.targetPlatform == 'StandaloneWindows64-Unity6' | |
| steps: | |
| - name: Cleanup old builds | |
| run: | | |
| # Remove previous build to save space | |
| if (Test-Path "sample-unity6/Tests") { Remove-Item -Recurse -Force "sample-unity6/Tests" -ErrorAction SilentlyContinue } | |
| - uses: actions/checkout@v3 | |
| with: | |
| lfs: true | |
| - name: Setup symlinks for Unity 6 Windows | |
| run: .\setup-symlinks.ps1 | |
| - name: Verify symlinks were created | |
| run: | | |
| Write-Output "Verifying symlinks..." | |
| Write-Output "Checking Editor folder:" | |
| if (Test-Path "sample-unity6/Assets/Editor") { | |
| Write-Output "✅ Editor folder exists" | |
| if ((Get-Item "sample-unity6/Assets/Editor").LinkType -eq "Junction") { | |
| Write-Output "✅ Editor is a symlink" | |
| Write-Output "Target: $((Get-Item 'sample-unity6/Assets/Editor').Target)" | |
| } | |
| Write-Output "Editor contents:" | |
| Get-ChildItem "sample-unity6/Assets/Editor" | Select-Object -First 10 Name | |
| Write-Output "" | |
| Write-Output "Looking for WindowsBuilderUnity6.cs:" | |
| if (Test-Path "sample-unity6/Assets/Editor/WindowsBuilderUnity6.cs") { | |
| Write-Output "✅ WindowsBuilderUnity6.cs found" | |
| } else { | |
| Write-Output "❌ WindowsBuilderUnity6.cs NOT found" | |
| exit 1 | |
| } | |
| } else { | |
| Write-Output "❌ Editor folder does not exist" | |
| exit 1 | |
| } | |
| - name: Force clean package resolution | |
| run: | | |
| Write-Output "Removing Library folder to force clean package resolution..." | |
| if (Test-Path "sample-unity6/Library") { Remove-Item -Recurse -Force "sample-unity6/Library" } | |
| Write-Output "✅ Library folder removed" | |
| - name: Ensure Tests directory exists | |
| run: | | |
| Write-Output "Ensuring Tests directory/symlink exists..." | |
| if (-not (Test-Path "sample-unity6/Tests")) { | |
| Write-Output "Creating Tests directory..." | |
| New-Item -ItemType Directory -Path "sample-unity6/Tests" -Force | |
| } else { | |
| $item = Get-Item "sample-unity6/Tests" | |
| if ($item.LinkType) { | |
| Write-Output "✅ Tests is a symlink to: $($item.Target)" | |
| } else { | |
| Write-Output "✅ Tests directory exists" | |
| } | |
| } | |
| - name: Import packages and prepare project | |
| run: | | |
| Write-Output "Opening Unity to import packages (without building)..." | |
| Write-Output "This step just lets Unity import all packages without trying to execute a build." | |
| Write-Output "" | |
| # Start Unity without -quit so it stays open, but with a timeout | |
| $unityProcess = Start-Process -FilePath "C:\Program Files\Unity\Hub\Editor\6000.0.58f2\Editor\Unity.exe" ` | |
| -ArgumentList "-projectPath", "${{ github.workspace }}\sample-unity6", ` | |
| "-logFile", "${{ github.workspace }}\sample-unity6\import-log.txt", ` | |
| "-batchmode", "-nographics" ` | |
| -PassThru -NoNewWindow | |
| Write-Output "Unity process started (PID: $($unityProcess.Id))" | |
| Write-Output "Waiting for package import to complete..." | |
| Write-Output "Will check for completion every 10 seconds (max 5 minutes)" | |
| $maxWaitSeconds = 300 | |
| $checkInterval = 10 | |
| $elapsed = 0 | |
| $packagesImported = $false | |
| while ($elapsed -lt $maxWaitSeconds) { | |
| Start-Sleep -Seconds $checkInterval | |
| $elapsed += $checkInterval | |
| # Check if AltTester package has been imported | |
| if (Test-Path "${{ github.workspace }}\sample-unity6\Library\PackageCache\*alttester*") { | |
| Write-Output "✅ AltTester package found! Packages have been imported." | |
| $packagesImported = $true | |
| break | |
| } | |
| Write-Output "Still importing... ($elapsed seconds elapsed)" | |
| } | |
| # Kill Unity process | |
| Write-Output "Stopping Unity process..." | |
| Stop-Process -Id $unityProcess.Id -Force -ErrorAction SilentlyContinue | |
| Start-Sleep -Seconds 2 | |
| if ($packagesImported) { | |
| Write-Output "✅ Package import completed successfully" | |
| } else { | |
| Write-Output "⚠️ Timeout waiting for packages, but continuing anyway" | |
| } | |
| Write-Output "" | |
| Write-Output "Import log (last 50 lines):" | |
| if (Test-Path "${{ github.workspace }}\sample-unity6\import-log.txt") { | |
| Get-Content "${{ github.workspace }}\sample-unity6\import-log.txt" -Tail 50 | |
| } else { | |
| Write-Output "⚠️ Log file not found" | |
| } | |
| - name: Build Unity 6 Windows executable | |
| run: | | |
| Write-Output "Building Unity 6 Windows executable (packages should be ready now)..." | |
| Write-Output "Starting Unity build..." | |
| & "C:\Program Files\Unity\Hub\Editor\6000.0.58f2\Editor\Unity.exe" -projectPath "${{ github.workspace }}\sample-unity6" -executeMethod "WindowsBuilderUnity6.BuildForAltTester" -logFile "${{ github.workspace }}\sample-unity6\build-log.log" -quit -batchmode -nographics --buildPath "${{ github.workspace }}\sample-unity6\Tests\Sample Unity 6 Windows.exe" | |
| $buildExitCode = $LASTEXITCODE | |
| Write-Output "" | |
| Write-Output "Build completed with exit code: $buildExitCode" | |
| # Wait a moment for file system to settle | |
| Start-Sleep -Seconds 2 | |
| Write-Output "" | |
| Write-Output "Build log (last 100 lines):" | |
| $logPath = "${{ github.workspace }}\sample-unity6\build-log.log" | |
| if (Test-Path $logPath) { | |
| Write-Output "Log file found at: $logPath" | |
| Get-Content $logPath -Tail 100 | |
| } else { | |
| Write-Output "⚠️ Log file not found at: $logPath" | |
| Write-Output "Checking current directory..." | |
| if (Test-Path "sample-unity6\build-log.log") { | |
| Write-Output "Found in relative path!" | |
| Get-Content "sample-unity6\build-log.log" -Tail 100 | |
| } else { | |
| Write-Output "Listing sample-unity6 directory:" | |
| Get-ChildItem "sample-unity6" -File | Where-Object { $_.Name -like "*.log" -or $_.Name -like "*.txt" } | Format-Table Name, Length, LastWriteTime | |
| } | |
| } | |
| Write-Output "" | |
| Write-Output "Checking for build output..." | |
| Get-ChildItem sample-unity6/Tests/ -ErrorAction SilentlyContinue | |
| Write-Output "" | |
| Write-Output "Searching for executable..." | |
| $exePaths = @( | |
| "${{ github.workspace }}\sample-unity6\Tests\Sample Unity 6 Windows.exe", | |
| "sample-unity6\Tests\Sample Unity 6 Windows.exe", | |
| "${{ github.workspace }}\sample\Tests\Sample Unity 6 Windows.exe", | |
| "sample\Tests\Sample Unity 6 Windows.exe" | |
| ) | |
| $exeFound = $false | |
| foreach ($path in $exePaths) { | |
| if (Test-Path $path) { | |
| Write-Output "✅ Build succeeded! Executable found at: $path" | |
| $fileSize = (Get-Item $path).Length / 1MB | |
| Write-Output "File size: $([math]::Round($fileSize, 2)) MB" | |
| $exeFound = $true | |
| break | |
| } else { | |
| Write-Output "Not found: $path" | |
| } | |
| } | |
| if (-not $exeFound) { | |
| Write-Output "" | |
| Write-Output "❌ Build failed! Executable not found in any expected location" | |
| Write-Output "" | |
| Write-Output "Full build log:" | |
| if (Test-Path "${{ github.workspace }}\sample-unity6\build-log.log") { | |
| Get-Content "${{ github.workspace }}\sample-unity6\build-log.log" | |
| } elseif (Test-Path "sample-unity6\build-log.log") { | |
| Get-Content "sample-unity6\build-log.log" | |
| } else { | |
| Write-Output "⚠️ Build log not found" | |
| } | |
| exit 1 | |
| } | |
| - uses: actions/setup-python@v4 | |
| with: | |
| python-version: "3.13" | |
| - name: Verify test files are accessible | |
| run: | | |
| Write-Output "Checking for test files in sample-unity6/Tests..." | |
| if (Test-Path "sample-unity6/Tests/requirements-desktop.txt") { | |
| Write-Output "✅ requirements-desktop.txt found" | |
| } else { | |
| Write-Output "⚠️ requirements-desktop.txt not found, trying sample/Tests..." | |
| if (Test-Path "sample/Tests/requirements-desktop.txt") { | |
| Write-Output "✅ Found in sample/Tests" | |
| } else { | |
| Write-Output "❌ requirements-desktop.txt not found" | |
| exit 1 | |
| } | |
| } | |
| if (Test-Path "sample-unity6/Tests/test") { | |
| Write-Output "✅ test directory found" | |
| } else { | |
| Write-Output "⚠️ test directory not found in sample-unity6/Tests" | |
| } | |
| - name: Install dependencies | |
| run: | | |
| if (Test-Path "sample-unity6/Tests/requirements-desktop.txt") { | |
| pip install -r sample-unity6/Tests/requirements-desktop.txt | |
| } else { | |
| Write-Output "Installing from sample/Tests instead..." | |
| pip install -r sample/Tests/requirements-desktop.txt | |
| } | |
| - name: Run UI tests | |
| env: | |
| UNITY_APP_PATH: Sample Unity 6 Windows.exe | |
| UNITY_APP_NAME: Sample Unity 6 Windows | |
| MAILSLURP_API_KEY: ${{ secrets.MAILSLURP_API_KEY }} | |
| BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }} | |
| BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }} | |
| working-directory: sample-unity6/Tests | |
| run: python -m pytest -xs test/test_windows.py::WindowsTest | |
| - name: Upload import log | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: Unity6-Windows-Import-Log | |
| path: sample-unity6/import-log.txt | |
| - name: Upload build log | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: Unity6-Windows-Build-Log | |
| path: sample-unity6/build-log.log | |
| test: | |
| name: Run ${{ matrix.targetPlatform }} UI tests 🧪 | |
| needs: build | |
| strategy: | |
| matrix: | |
| include: | |
| - targetPlatform: StandaloneOSX | |
| runs-on: [self-hosted, macOS] | |
| test_script: pytest -xs test/test_mac.py::MacTest | |
| projectPath: sample | |
| unityAppName: SampleApp | |
| unityAppExtension: .app | |
| concurrency_group: macos | |
| - targetPlatform: StandaloneWindows64 | |
| runs-on: [self-hosted, windows] | |
| test_script: python -m pytest -xs test/test_windows.py::WindowsTest | |
| projectPath: sample | |
| unityAppName: Immutable Sample | |
| unityAppExtension: .exe | |
| concurrency_group: windows | |
| # - targetPlatform: Android | |
| # runs-on: [ self-hosted, macOS ] | |
| # test_script: browserstack-sdk pytest -s ./test/test_android.py --browserstack.config "browserstack.android.yml" | |
| concurrency: | |
| group: ui-tests-email-inbox-${{ matrix.concurrency_group }} | |
| cancel-in-progress: false # Let tests complete rather than canceling | |
| runs-on: ${{ matrix.runs-on }} | |
| steps: | |
| - uses: actions/checkout@v3 | |
| if: github.event_name != 'workflow_dispatch' || github.event.inputs.targetPlatform == 'All' || github.event.inputs.targetPlatform == matrix.targetPlatform | |
| with: | |
| lfs: true | |
| - name: Create temporary keychain | |
| if: contains(matrix.targetPlatform, 'StandaloneOSX') && (github.event_name != 'workflow_dispatch' || github.event.inputs.targetPlatform == 'All' || github.event.inputs.targetPlatform == matrix.targetPlatform) | |
| run: | | |
| security list-keychains | |
| security delete-keychain temporary || true | |
| security list-keychains | |
| security create-keychain -p "" temporary | |
| security default-keychain -s temporary | |
| security unlock-keychain -p "" temporary | |
| security set-keychain-settings -lut 600 temporary | |
| - uses: actions/download-artifact@v4 | |
| if: github.event_name != 'workflow_dispatch' || github.event.inputs.targetPlatform == 'All' || github.event.inputs.targetPlatform == matrix.targetPlatform | |
| with: | |
| name: Build-${{ matrix.targetPlatform }} | |
| path: ${{ matrix.projectPath }}/Tests | |
| - name: Make macOS artifact executable | |
| if: | | |
| contains(matrix.targetPlatform, 'StandaloneOSX') && | |
| (github.event_name != 'workflow_dispatch' || github.event.inputs.targetPlatform == 'All' || github.event.inputs.targetPlatform == matrix.targetPlatform) | |
| run: chmod -R +x '${{ matrix.projectPath }}/Tests/${{ matrix.unityAppName }}.app/Contents/MacOS' | |
| - uses: actions/setup-python@v4 | |
| if: github.event_name != 'workflow_dispatch' || github.event.inputs.targetPlatform == 'All' || github.event.inputs.targetPlatform == matrix.targetPlatform | |
| with: | |
| python-version: "3.13" | |
| - name: Install dependencies (Windows) | |
| if: matrix.targetPlatform == 'StandaloneWindows64' && (github.event_name != 'workflow_dispatch' || github.event.inputs.targetPlatform == 'All' || github.event.inputs.targetPlatform == 'StandaloneWindows64') | |
| run: pip install -r "${{ matrix.projectPath }}/Tests/requirements-desktop.txt" | |
| - name: Install dependencies (Mac) | |
| if: contains(matrix.targetPlatform, 'StandaloneOSX') && (github.event_name != 'workflow_dispatch' || github.event.inputs.targetPlatform == 'All' || github.event.inputs.targetPlatform == matrix.targetPlatform) | |
| run: pip install -r "${{ matrix.projectPath }}/Tests/requirements-desktop.txt" | |
| - name: Run UI tests | |
| if: github.event_name != 'workflow_dispatch' || github.event.inputs.targetPlatform == 'All' || github.event.inputs.targetPlatform == matrix.targetPlatform | |
| env: | |
| UNITY_APP_PATH: ${{ matrix.unityAppName }}${{ matrix.unityAppExtension }} | |
| UNITY_APP_NAME: ${{ matrix.unityAppName }} | |
| MAILSLURP_API_KEY: ${{ secrets.MAILSLURP_API_KEY }} | |
| BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }} | |
| BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }} | |
| working-directory: ${{ matrix.projectPath }}/Tests | |
| run: ${{ matrix.test_script }} | |
| - name: Remove temporary keychain | |
| if: contains(matrix.targetPlatform, 'StandaloneOSX') && (github.event_name != 'workflow_dispatch' || github.event.inputs.targetPlatform == 'All' || github.event.inputs.targetPlatform == matrix.targetPlatform) | |
| run: | | |
| security list-keychains | |
| security delete-keychain temporary | |
| security default-keychain -s ~/Library/Keychains/login.keychain-db | |
| security list-keychains -d user -s ~/Library/Keychains/login.keychain-db | |
| security list-keychains | |
| # build-ios: #test-ios: | |
| # name: Run iOS build #UI tests 🧪 | |
| # needs: | |
| # - build | |
| # - test | |
| # runs-on: [ self-hosted, macOS ] | |
| # if: github.event_name != 'workflow_dispatch' || github.event.inputs.targetPlatform == 'All' || github.event.inputs.targetPlatform == 'iOS' | |
| # steps: | |
| # - uses: actions/checkout@v3 | |
| # with: | |
| # lfs: true | |
| # - name: Build iOS app | |
| # working-directory: sample | |
| # run: | | |
| # export TMPDIR=/Users/svc_buildsdk/tmp | |
| # mkdir -p $TMPDIR | |
| # ./build_ios.sh | |
| # - uses: actions/setup-python@v4 | |
| # with: | |
| # python-version: "3.13" | |
| # - name: Install dependencies | |
| # run: pip install -r "sample/Tests/requirements-mobile.txt" | |
| # - name: Run UI tests | |
| # env: | |
| # MAILSLURP_API_KEY: ${{ secrets.MAILSLURP_API_KEY }} | |
| # BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }} | |
| # BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }} | |
| # working-directory: sample/Tests/test/ios | |
| # run: browserstack-sdk pytest -xs ./test_ios.py --browserstack.config "browserstack.ios.yml" |