From 063e83ea78fc253c93de130f4676a8b110325551 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mi=C5=82osz=20Matkowski?= Date: Fri, 30 Aug 2024 21:44:00 +0200 Subject: [PATCH 01/10] Force standalone tests in the test.yml workflow --- .github/workflows/test.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4833111e..07a70e25 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -43,7 +43,10 @@ jobs: - uses: game-ci/unity-test-runner@v2 id: testRunner with: - testMode: all + testMode: + - playmode + - editmode + - standalone - uses: actions/upload-artifact@v2 with: From fe9e2c4268d2ea0f6dfeeb44a9ecba147f77ef68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mi=C5=82osz=20Matkowski?= Date: Fri, 30 Aug 2024 21:51:01 +0200 Subject: [PATCH 02/10] Change actions to latest versions --- .github/workflows/test.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 07a70e25..a2f7536b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,13 +13,13 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Create LFS file list run: git lfs ls-files -l | cut -d' ' -f1 | sort > .lfs-assets-id - name: Restore LFS cache - uses: actions/cache@v2 + uses: actions/cache@v3 id: lfs-cache with: path: .git/lfs @@ -40,7 +40,7 @@ jobs: Library-test-project- Library- - - uses: game-ci/unity-test-runner@v2 + - uses: game-ci/unity-test-runner@v4 id: testRunner with: testMode: @@ -48,7 +48,7 @@ jobs: - editmode - standalone - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 with: name: Test results (all modes) path: ${{ steps.testRunner.outputs.artifactsPath }} \ No newline at end of file From c71df7761ed1ef06f32740a4d21e927883653edc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mi=C5=82osz=20Matkowski?= Date: Fri, 30 Aug 2024 21:55:49 +0200 Subject: [PATCH 03/10] Use matrixes to setup initial test data --- .github/workflows/test.yml | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a2f7536b..b0f992ef 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,8 +9,17 @@ env: jobs: testRunner: - name: Test all modes 📝 + name: Test ${{ matrix.testMode }} 📝 runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + projectPath: + - test-project + testMode: + - playmode + - editmode + - standalone steps: - name: Checkout code uses: actions/checkout@v4 @@ -43,12 +52,12 @@ jobs: - uses: game-ci/unity-test-runner@v4 id: testRunner with: - testMode: - - playmode - - editmode - - standalone + testMode: ${{ matrix.testMode }} + artifactsPath: ${{ matrix.testMode }}-artifacts + checkName: ${{ matrix.testMode }} Test Results - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v3 + if: always() with: - name: Test results (all modes) - path: ${{ steps.testRunner.outputs.artifactsPath }} \ No newline at end of file + name: Test results for ${{ matrix.testMode }} + path: ${{ steps.tests.outputs.artifactsPath }} \ No newline at end of file From 2920190b3697259dfa9638e49cf6e691af8d1b0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mi=C5=82osz=20Matkowski?= Date: Fri, 30 Aug 2024 21:57:38 +0200 Subject: [PATCH 04/10] Attempt to fix syntax --- .github/workflows/test.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b0f992ef..2b28e223 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,13 +9,11 @@ env: jobs: testRunner: - name: Test ${{ matrix.testMode }} 📝 + name: Test 📝 runs-on: ubuntu-latest strategy: fail-fast: false matrix: - projectPath: - - test-project testMode: - playmode - editmode From f8cdebaad25428606f822b834066c08f78ac41a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mi=C5=82osz=20Matkowski?= Date: Fri, 30 Aug 2024 22:04:25 +0200 Subject: [PATCH 05/10] Attempt to fix syntax --- .github/workflows/test.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2b28e223..e9da76d5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,15 +9,15 @@ env: jobs: testRunner: - name: Test 📝 + name: Test runs-on: ubuntu-latest strategy: - fail-fast: false - matrix: - testMode: - - playmode - - editmode - - standalone + fail-fast: false + matrix: + testMode: + - playmode + - editmode + - standalone steps: - name: Checkout code uses: actions/checkout@v4 From a2608c79ebbe196d006620eb170724b2456800bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mi=C5=82osz=20Matkowski?= Date: Fri, 30 Aug 2024 22:06:23 +0200 Subject: [PATCH 06/10] Attempt to fix syntax --- .github/workflows/test.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e9da76d5..f08eb157 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -8,16 +8,16 @@ env: UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} jobs: - testRunner: - name: Test + testAllModes: + name: Test in ${{ matrix.testMode }} runs-on: ubuntu-latest strategy: - fail-fast: false - matrix: - testMode: - - playmode - - editmode - - standalone + fail-fast: false + matrix: + testMode: + - playmode + - editmode + - standalone steps: - name: Checkout code uses: actions/checkout@v4 From eaa761528633d79291d9424d009801fa4647f8a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mi=C5=82osz=20Matkowski?= Date: Fri, 30 Aug 2024 22:40:44 +0200 Subject: [PATCH 07/10] Attempt to fix syntax --- .github/workflows/test.yml | 31 ++++++------------------------- 1 file changed, 6 insertions(+), 25 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f08eb157..ea60c1ad 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,7 +9,7 @@ env: jobs: testAllModes: - name: Test in ${{ matrix.testMode }} + name: Test in '${{ matrix.testMode }}' 📝 runs-on: ubuntu-latest strategy: fail-fast: false @@ -19,42 +19,23 @@ jobs: - editmode - standalone steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Create LFS file list - run: git lfs ls-files -l | cut -d' ' -f1 | sort > .lfs-assets-id - - - name: Restore LFS cache - uses: actions/cache@v3 - id: lfs-cache + - uses: actions/checkout@v4 with: - path: .git/lfs - key: ${{ runner.os }}-lfs-${{ hashFiles('.lfs-assets-id') }} - - - name: Git LFS Pull - run: | - git lfs pull - git add . - git reset --hard - - - name: Restore Library cache - uses: actions/cache@v2 + lfs: true + - uses: actions/cache@v3 with: path: Library key: Library-test-project restore-keys: | Library-test-project- Library- - - uses: game-ci/unity-test-runner@v4 - id: testRunner + id: tests with: testMode: ${{ matrix.testMode }} artifactsPath: ${{ matrix.testMode }}-artifacts checkName: ${{ matrix.testMode }} Test Results - - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v3 if: always() with: name: Test results for ${{ matrix.testMode }} From 1c10ddd6b32b617c2a9beaa41e7e436b58db9123 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mi=C5=82osz=20Matkowski?= Date: Fri, 30 Aug 2024 23:02:55 +0200 Subject: [PATCH 08/10] Add secrets --- .github/workflows/test.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ea60c1ad..66cda1f3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -6,6 +6,8 @@ on: env: UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} + UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} + UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} jobs: testAllModes: From b7e5fa9af2e2b8f18cc99a8e56261a6d6d1af07c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mi=C5=82osz=20Matkowski?= Date: Fri, 30 Aug 2024 23:11:28 +0200 Subject: [PATCH 09/10] Break code compilation (temp) --- .../Runtime/Serialization/SerializedDirectory.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Assets/Editor Toolbox/Runtime/Serialization/SerializedDirectory.cs b/Assets/Editor Toolbox/Runtime/Serialization/SerializedDirectory.cs index ecd11ece..2b7df920 100644 --- a/Assets/Editor Toolbox/Runtime/Serialization/SerializedDirectory.cs +++ b/Assets/Editor Toolbox/Runtime/Serialization/SerializedDirectory.cs @@ -16,7 +16,7 @@ public class SerializedDirectory : ISerializationCallbackReceiver [SerializeField, Disable] private string path; -#if UNITY_EDITOR +//#if UNITY_EDITOR internal static bool IsAssetValid(DefaultAsset asset, out string path) { path = asset != null ? AssetDatabase.GetAssetPath(asset) : null; @@ -34,7 +34,7 @@ internal static bool IsAssetValid(DefaultAsset asset, out string path) return false; } -#endif +//#endif void ISerializationCallbackReceiver.OnAfterDeserialize() { } From ef753793d956f050d4e6500dac0c49aa9bbebca7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mi=C5=82osz=20Matkowski?= Date: Fri, 30 Aug 2024 23:24:04 +0200 Subject: [PATCH 10/10] Restore appropriate code --- .../Runtime/Serialization/SerializedDirectory.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Assets/Editor Toolbox/Runtime/Serialization/SerializedDirectory.cs b/Assets/Editor Toolbox/Runtime/Serialization/SerializedDirectory.cs index 2b7df920..ecd11ece 100644 --- a/Assets/Editor Toolbox/Runtime/Serialization/SerializedDirectory.cs +++ b/Assets/Editor Toolbox/Runtime/Serialization/SerializedDirectory.cs @@ -16,7 +16,7 @@ public class SerializedDirectory : ISerializationCallbackReceiver [SerializeField, Disable] private string path; -//#if UNITY_EDITOR +#if UNITY_EDITOR internal static bool IsAssetValid(DefaultAsset asset, out string path) { path = asset != null ? AssetDatabase.GetAssetPath(asset) : null; @@ -34,7 +34,7 @@ internal static bool IsAssetValid(DefaultAsset asset, out string path) return false; } -//#endif +#endif void ISerializationCallbackReceiver.OnAfterDeserialize() { }