test(workspace): verify standalone package hosts
Validate ShrinkSDK Workspace / unity (push) Failing after 3m4s
Validate ShrinkSDK Workspace / unity (push) Failing after 3m4s
This commit is contained in:
@@ -0,0 +1,74 @@
|
|||||||
|
name: Verify ShrinkSDK Package Hosts
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
editmode:
|
||||||
|
runs-on: unity-2022.3.62f3
|
||||||
|
container:
|
||||||
|
image: docker.1panel.live/unityci/editor:ubuntu-2022.3.62f3-windows-mono-3
|
||||||
|
volumes:
|
||||||
|
- /www/dk_project/bt-recovery/gitea/runner/seedskey-unity-license:/root/.local/share/unity3d/Unity
|
||||||
|
- /www/dk_project/bt-recovery/gitea/runner/seedskey-unity-entitlements:/root/.config/unity3d/Unity/licenses
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
env:
|
||||||
|
UNITY_VERSION: 2022.3.62f3
|
||||||
|
steps:
|
||||||
|
- name: Fetch exact Workspace revision and submodules
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
ref="${{ gitea.sha }}"
|
||||||
|
git init .
|
||||||
|
git remote add origin "https://git.crash.work/ShrinkSDK/Workspace.git"
|
||||||
|
git fetch --depth=1 origin "$ref"
|
||||||
|
git checkout --detach FETCH_HEAD
|
||||||
|
git submodule sync --recursive
|
||||||
|
git submodule update --init --recursive
|
||||||
|
test "$(git submodule status --recursive | wc -l | tr -d ' ')" = "21"
|
||||||
|
test -z "$(git submodule status --recursive | grep '^-')"
|
||||||
|
|
||||||
|
- name: Run every standalone package EditMode host
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
machine_id_file="/root/.local/share/unity3d/Unity/.machine-id"
|
||||||
|
if test -s "$machine_id_file"; then
|
||||||
|
cat "$machine_id_file" > /etc/machine-id
|
||||||
|
echo "Unity machine identity restored"
|
||||||
|
fi
|
||||||
|
unity_bin="$(command -v unity-editor || command -v unity || command -v Unity || true)"
|
||||||
|
test -n "$unity_bin"
|
||||||
|
"$unity_bin" -version | head -n 1 | grep -F "$UNITY_VERSION"
|
||||||
|
|
||||||
|
failed=0
|
||||||
|
for host in Assets/Modules/*/Development~/UnityProject; do
|
||||||
|
package_root="$(dirname "$(dirname "$host")")"
|
||||||
|
package_name="$(basename "$package_root")"
|
||||||
|
results_dir="$host/TestResults"
|
||||||
|
results_file="$results_dir/editmode.xml"
|
||||||
|
log_file="$results_dir/unity.log"
|
||||||
|
mkdir -p "$results_dir"
|
||||||
|
echo "::group::${package_name} EditMode"
|
||||||
|
status=0
|
||||||
|
"$unity_bin" \
|
||||||
|
-batchmode \
|
||||||
|
-nographics \
|
||||||
|
-quit \
|
||||||
|
-projectPath "$host" \
|
||||||
|
-runTests \
|
||||||
|
-testPlatform EditMode \
|
||||||
|
-testResults "$results_file" \
|
||||||
|
-logFile "$log_file" || status=$?
|
||||||
|
if test "$status" -ne 0 || ! test -s "$results_file" || ! grep -q 'result="Passed"' "$results_file"; then
|
||||||
|
failed=1
|
||||||
|
echo "${package_name} EditMode verification failed" >&2
|
||||||
|
tail -n 220 "$log_file" || true
|
||||||
|
else
|
||||||
|
echo "${package_name} EditMode verification passed"
|
||||||
|
fi
|
||||||
|
echo "::endgroup::"
|
||||||
|
done
|
||||||
|
exit "$failed"
|
||||||
Submodule Assets/Modules/ShrinkApp.Core updated: 8955a159db...7d65b6aa0e
Submodule Assets/Modules/ShrinkApp.Starter.Basic updated: e136f01e81...312dd98943
Submodule Assets/Modules/ShrinkCommand updated: c2cf934830...a3a76e805f
Submodule Assets/Modules/ShrinkCommand.Integration.App updated: a064a7c251...9bb57025dc
Submodule Assets/Modules/ShrinkCommand.Integration.EventBus updated: c369cc18a3...63f23f397e
Submodule Assets/Modules/ShrinkCommand.Integration.Network updated: 4d8d6402fd...e7f2d73588
Submodule Assets/Modules/ShrinkContext.AppAdapter updated: e8d3a62031...d53b1b7997
Submodule Assets/Modules/ShrinkContext.Core updated: 95b82aaac9...709e9c18a4
Submodule Assets/Modules/ShrinkContext.EventBusAdapter updated: 153cc57e8d...5426e21c21
Submodule Assets/Modules/ShrinkDataSaver updated: c39314acbc...65a1553612
Submodule Assets/Modules/ShrinkDataSaver.Integration.App updated: 19654e868a...c8cf6e8713
Submodule Assets/Modules/ShrinkDataSaver.Integration.EventBus updated: 11ca5c53d4...fa7897f827
Submodule Assets/Modules/ShrinkEventBus updated: 58f21a02c2...ba84865d7a
Submodule Assets/Modules/ShrinkEventBus.Entities updated: 3274067ca2...905c827552
Submodule Assets/Modules/ShrinkInstaller updated: 6fa2ad2623...afc58da579
Submodule Assets/Modules/ShrinkModFramework updated: e793a0a742...a5a7f3329f
Submodule Assets/Modules/ShrinkNetwork updated: e9ce97df85...6709e9dea3
Submodule Assets/Modules/ShrinkNetwork.Integration.App updated: 054baa471b...0df62beb1c
Submodule Assets/Modules/ShrinkNetwork.Integration.EventBus updated: 9e8a68c47c...91e0f5e679
Submodule Assets/Modules/ShrinkShared.CodeGen updated: b6807389e6...ec48264704
Submodule Assets/Modules/ShrinkTutorial updated: 61b7c4da73...e279c4230e
@@ -273,6 +273,7 @@ jobs:
|
|||||||
'com.cysharp.unitask' = 'https://github.com/Cysharp/UniTask.git?path=src/UniTask/Assets/Plugins/UniTask#7c0f199fe0d3fc528024488ccd671e6c7b27745b'
|
'com.cysharp.unitask' = 'https://github.com/Cysharp/UniTask.git?path=src/UniTask/Assets/Plugins/UniTask#7c0f199fe0d3fc528024488ccd671e6c7b27745b'
|
||||||
$PackageName = 'file:../../..'
|
$PackageName = 'file:../../..'
|
||||||
}
|
}
|
||||||
|
testables = @($PackageName)
|
||||||
}
|
}
|
||||||
$developmentRoot = Join-Path $PackageRoot 'Development~/UnityProject'
|
$developmentRoot = Join-Path $PackageRoot 'Development~/UnityProject'
|
||||||
Write-Utf8File -Path (Join-Path $developmentRoot 'Packages/manifest.json') -Content (($manifest | ConvertTo-Json -Depth 12) + [Environment]::NewLine)
|
Write-Utf8File -Path (Join-Path $developmentRoot 'Packages/manifest.json') -Content (($manifest | ConvertTo-Json -Depth 12) + [Environment]::NewLine)
|
||||||
|
|||||||
Reference in New Issue
Block a user