feat(workspace): add package installation validation
Validate ShrinkSDK Workspace / unity (push) Failing after 8s
Validate ShrinkSDK Workspace / unity (push) Failing after 8s
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
name: Validate ShrinkSDK Workspace
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
unity:
|
||||
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
|
||||
module_count="$(git submodule status --recursive | wc -l | tr -d ' ')"
|
||||
test "$module_count" = "21"
|
||||
test -z "$(git submodule status --recursive | grep '^-')"
|
||||
git submodule status --recursive
|
||||
|
||||
- name: Compile Workspace and validate package graph
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
unity_bin="$(command -v unity-editor || command -v unity || command -v Unity || true)"
|
||||
test -n "$unity_bin"
|
||||
mkdir -p Artifacts
|
||||
"$unity_bin" -version | head -n 1 | grep -F "$UNITY_VERSION"
|
||||
status=0
|
||||
"$unity_bin" \
|
||||
-batchmode \
|
||||
-nographics \
|
||||
-quit \
|
||||
-projectPath "$PWD" \
|
||||
-executeMethod ShrinkSDK.WorkspaceValidation.ShrinkSdkWorkspaceValidation.Run \
|
||||
-logFile "$PWD/Artifacts/unity-workspace-validation.log" || status=$?
|
||||
tail -n 240 "$PWD/Artifacts/unity-workspace-validation.log" || true
|
||||
exit "$status"
|
||||
Reference in New Issue
Block a user