44 lines
1.6 KiB
YAML
44 lines
1.6 KiB
YAML
name: Verify standalone Unity package
|
|
|
|
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
|
|
steps:
|
|
- name: Fetch selected revision
|
|
shell: bash
|
|
run: |
|
|
set -eu
|
|
ref="${{ gitea.sha }}"
|
|
git init .
|
|
git remote add origin "https://git.crash.work/ShrinkSDK/ShrinkCommand.Integration.App.git"
|
|
git fetch --depth=1 origin "$ref"
|
|
git checkout --detach FETCH_HEAD
|
|
|
|
- name: Run package EditMode tests
|
|
shell: bash
|
|
run: |
|
|
set -eu
|
|
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
|
|
git config --global url."https://ghfast.top/https://github.com/".insteadOf "https://github.com/"
|
|
unity_bin="$(command -v unity-editor || command -v unity || command -v Unity || true)"
|
|
test -n "$unity_bin"
|
|
"$unity_bin" \
|
|
-batchmode \
|
|
-nographics \
|
|
-projectPath "$PWD/Development~/UnityProject" \
|
|
-runTests \
|
|
-testPlatform EditMode \
|
|
-testResults "$PWD/TestResults/editmode.xml" \
|
|
-logFile "$PWD/TestResults/unity.log" |