Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
VALIDATE_ALL_CODEBASE: true
DEFAULT_BRANCH: main
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
FILTER_REGEX_EXCLUDE: (.*src/Packages/Passport/Runtime/ThirdParty/.*|.*src/Packages/Passport/Runtime/Resources/.*|.*Plugins/.*|.*src/Packages/Passport/Runtime/Assets/ImmutableAndroid.androidlib/.*|.*src/Packages/Orderbook|.*src/Packages/ZkEvmApi/.*|.*sample|.*src/Packages/Passport/WebGLTemplates~|.*.github/workflows|.*src/Packages/Passport/Samples~)
FILTER_REGEX_EXCLUDE: (.*src/Packages/Passport/Runtime/ThirdParty/.*|.*src/Packages/Passport/Runtime/Resources/.*|.*Plugins/.*|.*src/Packages/Passport/Runtime/Assets/ImmutableAndroid.androidlib/.*|.*src/Packages/Orderbook|.*src/Packages/ZkEvmApi/.*|.*examples/.*|.*src/Packages/Passport/WebGLTemplates~|.*.github/workflows|.*src/Packages/Passport/Samples~)
VALIDATE_MARKDOWN: false
VALIDATE_GITLEAKS: false
VALIDATE_JSCPD: false
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/test-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ on:
branches: [main]
paths:
- 'src/Packages/Passport/**'
- 'sample/**'
- 'sample-unity6/**'
- 'examples/passport/**'
- 'examples/passport-unity6/**'
- 'Plugins/**'
pull_request:
paths:
- 'src/Packages/Passport/**'
- 'sample/**'
- 'sample-unity6/**'
- 'examples/passport/**'
- 'examples/passport-unity6/**'
- 'Plugins/**'

concurrency:
Expand All @@ -40,7 +40,7 @@ jobs:
UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }}
with:
unityVersion: 2021.3.26f1
projectPath: './sample'
projectPath: './examples/passport'
githubToken: ${{ secrets.GITHUB_TOKEN }}
testMode: 'EditMode'
- uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -71,7 +71,7 @@ jobs:
UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }}
with:
unityVersion: 6000.0.58f2
projectPath: './sample-unity6'
projectPath: './examples/passport-unity6'
githubToken: ${{ secrets.GITHUB_TOKEN }}
testMode: 'EditMode'
- uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -118,7 +118,7 @@ jobs:
with:
unityVersion: 2021.3.26f1
targetPlatform: ${{ matrix.targetPlatform }}
projectPath: sample
projectPath: examples/passport
- uses: actions/upload-artifact@v4
if: always()
with:
Expand Down Expand Up @@ -157,7 +157,7 @@ jobs:
with:
unityVersion: 6000.0.58f2
targetPlatform: ${{ matrix.targetPlatform }}
projectPath: sample-unity6
projectPath: examples/passport-unity6
- uses: actions/upload-artifact@v4
if: always()
with:
Expand Down
94 changes: 47 additions & 47 deletions .github/workflows/ui-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ on:
branches: [main]
paths:
- 'src/Packages/Passport/**'
- 'sample/**'
- 'sample-unity6/**'
- 'examples/passport/**'
- 'examples/passport-unity6/**'
- 'Plugins/**'
pull_request:
paths:
- 'src/Packages/Passport/**'
- 'sample/**'
- 'sample-unity6/**'
- 'examples/passport/**'
- 'examples/passport-unity6/**'
- 'Plugins/**'

concurrency:
Expand All @@ -45,18 +45,18 @@ jobs:
include:
- targetPlatform: StandaloneOSX
buildMethod: MacBuilder.BuildForAltTester
buildPath: sample/Builds/MacOS
projectPath: sample
buildPath: examples/passport/Builds/MacOS
projectPath: examples/passport
unityVersion: 2021.3.26f1
- targetPlatform: StandaloneWindows64
buildMethod: WindowsBuilder.BuildForAltTester
buildPath: sample/Builds/Windows64
projectPath: sample
buildPath: examples/passport/Builds/Windows64
projectPath: examples/passport
unityVersion: 2021.3.26f1
# - targetPlatform: Android
# buildMethod: MobileBuilder.BuildForAltTester
# buildPath: sample/Builds/Android
# projectPath: sample
# buildPath: examples/passport/Builds/Android
# projectPath: examples/passport
# unityVersion: 2021.3.26f1
steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -106,7 +106,7 @@ jobs:
- name: Cleanup old builds
run: |
# Remove previous build to save space
rm -rf sample-unity6/Tests/* 2>/dev/null || true
rm -rf examples/passport-unity6/Tests/* 2>/dev/null || true
- uses: actions/checkout@v3
with:
lfs: true
Expand All @@ -115,18 +115,18 @@ jobs:
- name: Force clean package resolution
run: |
echo "Removing Library folder to force clean package resolution..."
rm -rf sample-unity6/Library
rm -rf examples/passport-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
mkdir -p examples/passport-unity6/Tests
/Applications/Unity/Hub/Editor/6000.0.58f2/Unity.app/Contents/MacOS/Unity -projectPath "${{ github.workspace }}/examples/passport-unity6" -executeMethod "MacBuilderUnity6.BuildForAltTester" -logFile "${{ github.workspace }}/examples/passport-unity6/first-build-log.txt" -quit -batchmode --buildPath "${{ github.workspace }}/examples/passport-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
if ls -la "${{ github.workspace }}/examples/passport-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"
Expand All @@ -136,11 +136,11 @@ jobs:
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"
mkdir -p examples/passport-unity6/Tests
/Applications/Unity/Hub/Editor/6000.0.58f2/Unity.app/Contents/MacOS/Unity -projectPath "${{ github.workspace }}/examples/passport-unity6" -executeMethod "MacBuilderUnity6.BuildForAltTester" -logFile "${{ github.workspace }}/examples/passport-unity6/build-log.log" -quit -batchmode --buildPath "${{ github.workspace }}/examples/passport-unity6/Tests/Sample Unity 6 macOS"

echo "Build completed. Checking for build output..."
ls -la sample-unity6/Tests/
ls -la examples/passport-unity6/Tests/
- name: Create temporary keychain
run: |
# Clean up any leftover temporary keychain from a previous failed run
Expand All @@ -153,20 +153,20 @@ jobs:
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'
run: chmod -R +x 'examples/passport-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
run: python -m pip install -r examples/passport-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
working-directory: examples/passport-unity6/Tests
run: pytest -xs test/test_mac.py::MacTest
- name: Close Brave Browser
if: always()
Expand All @@ -187,13 +187,13 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: Unity6-First-Build-Log
path: sample-unity6/first-build-log.txt
path: examples/passport-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
path: examples/passport-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 🛠️🧪
Expand All @@ -206,22 +206,22 @@ jobs:
- 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 }
if (Test-Path "examples/passport-unity6/Tests") { Remove-Item -Recurse -Force "examples/passport-unity6/Tests" -ErrorAction SilentlyContinue }
- uses: actions/checkout@v3
with:
lfs: true
- name: Cache Unity Library folder
uses: actions/cache@v3
with:
path: sample-unity6/Library
key: Library-Unity6-Windows-${{ hashFiles('sample-unity6/Assets/**', 'sample-unity6/Packages/**', 'sample-unity6/ProjectSettings/**') }}
path: examples/passport-unity6/Library
key: Library-Unity6-Windows-${{ hashFiles('examples/passport-unity6/Assets/**', 'examples/passport-unity6/Packages/**', 'examples/passport-unity6/ProjectSettings/**') }}
restore-keys: |
Library-Unity6-Windows-
- name: Setup symlinks for Unity 6 Windows
run: .\setup-symlinks.ps1
- name: Verify symlinks were created
run: |
if (-not (Test-Path "sample-unity6/Assets/Editor/WindowsBuilderUnity6.cs")) {
if (-not (Test-Path "examples/passport-unity6/Assets/Editor/WindowsBuilderUnity6.cs")) {
Write-Output "❌ Build script not found - symlink setup failed"
exit 1
}
Expand All @@ -230,17 +230,17 @@ jobs:
# Deleting it forces a complete reimport which takes too long
- name: Ensure Tests directory exists
run: |
if (-not (Test-Path "sample-unity6/Tests")) {
New-Item -ItemType Directory -Path "sample-unity6/Tests" -Force | Out-Null
if (-not (Test-Path "examples/passport-unity6/Tests")) {
New-Item -ItemType Directory -Path "examples/passport-unity6/Tests" -Force | Out-Null
}
- name: First build (resolves packages)
run: |
Write-Output "Running first build to trigger package resolution..."

$unityPath = "C:\Program Files\Unity\Hub\Editor\6000.0.58f2\Editor\Unity.exe"
$projectPath = "${{ github.workspace }}\sample-unity6"
$logFile = "${{ github.workspace }}\sample-unity6\first-build-log.txt"
$buildPath = "${{ github.workspace }}\sample-unity6\Tests\Sample Unity 6 Windows.exe"
$projectPath = "${{ github.workspace }}\examples\passport-unity6"
$logFile = "${{ github.workspace }}\examples\passport-unity6\first-build-log.txt"
$buildPath = "${{ github.workspace }}\examples\passport-unity6\Tests\Sample Unity 6 Windows.exe"

$arguments = @(
"-projectPath", "`"$projectPath`"",
Expand All @@ -257,8 +257,8 @@ jobs:

Write-Output "First build completed (exit code: $($process.ExitCode), may have failed, that's ok). Checking for AltTester..."

if (Test-Path "${{ github.workspace }}\sample-unity6\Library\PackageCache") {
$altTesterFound = Get-ChildItem "${{ github.workspace }}\sample-unity6\Library\PackageCache" -Filter "*alttester*" -ErrorAction SilentlyContinue
if (Test-Path "${{ github.workspace }}\examples\passport-unity6\Library\PackageCache") {
$altTesterFound = Get-ChildItem "${{ github.workspace }}\examples\passport-unity6\Library\PackageCache" -Filter "*alttester*" -ErrorAction SilentlyContinue
if ($altTesterFound) {
Write-Output "✅ AltTester found in PackageCache after first build"
} else {
Expand All @@ -273,9 +273,9 @@ jobs:

# Run Unity build
$unityPath = "C:\Program Files\Unity\Hub\Editor\6000.0.58f2\Editor\Unity.exe"
$projectPath = "${{ github.workspace }}\sample-unity6"
$logFile = "${{ github.workspace }}\sample-unity6\build-log.log"
$buildPath = "${{ github.workspace }}\sample-unity6\Tests\Sample Unity 6 Windows.exe"
$projectPath = "${{ github.workspace }}\examples\passport-unity6"
$logFile = "${{ github.workspace }}\examples\passport-unity6\build-log.log"
$buildPath = "${{ github.workspace }}\examples\passport-unity6\Tests\Sample Unity 6 Windows.exe"

# Build argument list with proper quoting for paths with spaces
$arguments = @(
Expand Down Expand Up @@ -314,16 +314,16 @@ jobs:
python-version: "3.13"
- name: Verify test files are accessible
run: |
if (-not (Test-Path "sample-unity6/Tests/requirements-desktop.txt") -and -not (Test-Path "sample/Tests/requirements-desktop.txt")) {
if (-not (Test-Path "examples/passport-unity6/Tests/requirements-desktop.txt") -and -not (Test-Path "examples/passport/Tests/requirements-desktop.txt")) {
Write-Output "❌ Test requirements file not found"
exit 1
}
- name: Install dependencies
run: |
if (Test-Path "sample-unity6/Tests/requirements-desktop.txt") {
pip install -r sample-unity6/Tests/requirements-desktop.txt
if (Test-Path "examples/passport-unity6/Tests/requirements-desktop.txt") {
python -m pip install -r examples/passport-unity6/Tests/requirements-desktop.txt
} else {
pip install -r sample/Tests/requirements-desktop.txt
python -m pip install -r examples/passport/Tests/requirements-desktop.txt
}
- name: Kill leftover Brave processes
if: always()
Expand All @@ -336,7 +336,7 @@ jobs:
MAILSLURP_API_KEY: ${{ secrets.MAILSLURP_API_KEY }}
BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }}
BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
working-directory: sample-unity6/Tests
working-directory: examples/passport-unity6/Tests
run: python -m pytest -xs test/test_windows.py::WindowsTest
- name: Close Brave Browser
if: always()
Expand All @@ -347,7 +347,7 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: Unity6-Windows-Build-Log
path: sample-unity6/build-log.log
path: examples/passport-unity6/build-log.log

test:
name: Run ${{ matrix.targetPlatform }} UI tests 🧪
Expand All @@ -360,14 +360,14 @@ jobs:
- targetPlatform: StandaloneOSX
runs-on: [self-hosted, macOS]
test_script: pytest -xs test/test_mac.py::MacTest
projectPath: sample
projectPath: examples/passport
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
projectPath: examples/passport
unityAppName: Immutable Sample
unityAppExtension: .exe
concurrency_group: windows
Expand Down Expand Up @@ -411,7 +411,7 @@ jobs:
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"
run: python -m 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"
Expand Down Expand Up @@ -474,5 +474,5 @@ jobs:
# 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
# working-directory: examples/passport/Tests/test/ios
# run: browserstack-sdk pytest -xs ./test_ios.py --browserstack.config "browserstack.ios.yml"
8 changes: 4 additions & 4 deletions .github/workflows/update-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,11 @@ jobs:
- name: Copy sample scenes and scripts to Passport package Samples~
id: copy_sample_scenes_and_scripts
run: |
rsync -av --exclude='*.meta' ./sample/Assets/Scenes/Passport ./src/Packages/Passport/Samples~/SamplesScenesScripts/Scenes/
rsync -av --exclude='*.meta' --exclude='features.json' --exclude='_prompts~/' --exclude='_tutorials~/' ./sample/Assets/Scripts/Passport ./src/Packages/Passport/Samples~/SamplesScenesScripts/Scripts/
rsync -av --exclude='*.meta' ./examples/passport/Assets/Scenes/Passport ./src/Packages/Passport/Samples~/SamplesScenesScripts/Scenes/
rsync -av --exclude='*.meta' --exclude='features.json' --exclude='_prompts~/' --exclude='_tutorials~/' ./examples/passport/Assets/Scripts/Passport ./src/Packages/Passport/Samples~/SamplesScenesScripts/Scripts/

rsync -av --exclude='*.meta' ./sample/Assets/Scenes/Marketplace ./src/Packages/Marketplace/Samples~/SamplesScenesScripts/Scenes/
rsync -av --exclude='*.meta' ./sample/Assets/Scripts/Marketplace ./src/Packages/Marketplace/Samples~/SamplesScenesScripts/Scripts/
rsync -av --exclude='*.meta' ./examples/passport/Assets/Scenes/Marketplace ./src/Packages/Marketplace/Samples~/SamplesScenesScripts/Scenes/
rsync -av --exclude='*.meta' ./examples/passport/Assets/Scripts/Marketplace ./src/Packages/Marketplace/Samples~/SamplesScenesScripts/Scripts/

- uses: gr2m/create-or-update-pull-request-action@v1
env:
Expand Down
Loading
Loading