diff --git a/.github/workflows/test-integration.yml b/.github/workflows/test-integration.yml index 6caaabf..0400a92 100644 --- a/.github/workflows/test-integration.yml +++ b/.github/workflows/test-integration.yml @@ -63,12 +63,12 @@ jobs: run: echo "secret_key=UNITY_LICENSE_$(echo ${{ matrix.unityVersion }} | cut -c 1-4)" >> "$GITHUB_ENV" - name: Run tests - uses: game-ci/unity-test-runner@0ff419b913a3630032cbe0de48a0099b5a9f0ed9 # v4 + uses: game-ci/unity-test-runner@32e57712352b500e17974b245a6dce9e11a73213 # v4.4.0 with: githubToken: ${{ secrets.GITHUB_TOKEN }} unityVersion: ${{ matrix.unityVersion }} # Default is `auto` checkName: test result (${{ matrix.unityVersion }}, ${{ matrix.testMode }}) - customParameters: -testCategory "Integration;!IgnoreCI" -testHelperScreenshotDirectory /github/workspace/artifacts/Screenshots + customParameters: -testCategory Integration;!IgnoreCI -testHelperScreenshotDirectory /github/workspace/artifacts/Screenshots # Note: `/github/workspace/artifacts` is the artifacts path inside the game-ci container testMode: ${{ matrix.testMode }} env: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d7341d4..dfdf88f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -46,12 +46,15 @@ jobs: - 6000.0.43f1 # Latest version that does not pin the test framework package. - 6000.0.44f1 # pin test-framework v1.5.1 - 6000.0.59f2 # pin test-framework v1.6.0 - - 6000.0.78f1 - - 6000.3.18f1 - - &latest_unity_version 6000.5.1f1 # pin test-framework v1.7.0 + - 6000.0.83f1 + - 6000.3.23f1 + - 6000.5.0f1 # pin test-framework v1.7.0 + - &latest_unity_version 6000.6.0f1 # pin test-framework v1.8.0 testMode: - All # run tests in editor include: + - unityVersion: 6000.0.59f2 + licensingMethod: personal # licensing client 1.17.2 rejects the .ulf (file) with a missing headless entitlement - unityVersion: *latest_unity_version octocov: true @@ -82,13 +85,18 @@ jobs: - name: Set license secret key run: echo "secret_key=UNITY_LICENSE_$(echo ${{ matrix.unityVersion }} | cut -c 1-4)" >> "$GITHUB_ENV" + - name: Force licensing method + run: echo "GAME_CI_UNITY_LICENSING_METHOD=${{ matrix.licensingMethod }}" >> "$GITHUB_ENV" + if: ${{ matrix.licensingMethod }} + # Not passed via `env:` on the test step: an empty GAME_CI_* value is still parsed and fails the CLI's choices check + - name: Run tests - uses: game-ci/unity-test-runner@0ff419b913a3630032cbe0de48a0099b5a9f0ed9 # v4 + uses: game-ci/unity-test-runner@32e57712352b500e17974b245a6dce9e11a73213 # v4.4.0 with: githubToken: ${{ secrets.GITHUB_TOKEN }} unityVersion: ${{ matrix.unityVersion }} # Default is `auto` checkName: test result (${{ matrix.unityVersion }}, ${{ matrix.testMode }}) - customParameters: -testCategory "!IgnoreCI;!Integration" -testHelperScreenshotDirectory /github/workspace/artifacts/Screenshots + customParameters: -testCategory !IgnoreCI;!Integration -testHelperScreenshotDirectory /github/workspace/artifacts/Screenshots # Note: `/github/workspace/artifacts` is the artifacts path inside the game-ci container coverageOptions: generateAdditionalMetrics;generateTestReferences;generateHtmlReport;generateAdditionalReports;dontClear;assemblyFilters:${{ env.assembly_filters }} # see: https://docs.unity3d.com/Packages/com.unity.testtools.codecoverage@1.2/manual/CoverageBatchmode.html @@ -104,7 +112,7 @@ jobs: if: ${{ matrix.octocov }} - name: Run octocov - uses: k1LoW/octocov-action@73d561f65d59e66899ed5c87e4621a913b5d5c20 # v1 + uses: k1LoW/octocov-action@a167dc0dee441b7ffc45e1b862ab55ec0d87f278 # v1.5.2 if: ${{ matrix.octocov }} - name: Upload test results diff --git a/Assets/APIExamples/Tests/Editor/UnityTestFramework/UnityTestFrameworkVersionCheck.cs b/Assets/APIExamples/Tests/Editor/UnityTestFramework/UnityTestFrameworkVersionCheck.cs index aaf4283..86a97e6 100644 --- a/Assets/APIExamples/Tests/Editor/UnityTestFramework/UnityTestFrameworkVersionCheck.cs +++ b/Assets/APIExamples/Tests/Editor/UnityTestFramework/UnityTestFrameworkVersionCheck.cs @@ -69,11 +69,19 @@ private static async UniTask GetTestFrameworkPackageVersionAsync() } [Test] - [UnityVersion(newerThanOrEqual: "6000.5.0f1")] - public async Task Unity6000_5_0f1以降_TestFrameworkはv1_7_0固定() + [UnityVersion(newerThanOrEqual: "6000.5.0f1", olderThan: "6000.6.0f1")] + public async Task Unity6000_5_0f1から6000_6_0f1まで_TestFrameworkはv1_7_0固定() { var actual = await GetTestFrameworkPackageVersionAsync(); Assert.That(actual, Is.EqualTo("1.7.0")); } + + [Test] + [UnityVersion(newerThanOrEqual: "6000.6.0f1")] + public async Task Unity6000_6_0f1以降_TestFrameworkはv1_8_0固定() + { + var actual = await GetTestFrameworkPackageVersionAsync(); + Assert.That(actual, Is.EqualTo("1.8.0")); + } } } diff --git a/Packages/manifest.json b/Packages/manifest.json index 7d02c9a..35ce2fd 100644 --- a/Packages/manifest.json +++ b/Packages/manifest.json @@ -1,7 +1,7 @@ { "dependencies": { "com.cysharp.unitask": "2.5.11", - "com.nowsprinting.create-script-folders-with-tests": "1.4.0", + "com.nowsprinting.create-script-folders-with-tests": "1.4.1", "com.nowsprinting.local-package-sample": "file:../LocalPackages/com.nowsprinting.local-package-sample", "com.nowsprinting.test-helper": "1.5.1", "com.nowsprinting.test-helper.input": "1.0.1", diff --git a/Packages/packages-lock.json b/Packages/packages-lock.json index 8831ee5..ede0363 100644 --- a/Packages/packages-lock.json +++ b/Packages/packages-lock.json @@ -8,7 +8,7 @@ "url": "https://package.openupm.com" }, "com.nowsprinting.create-script-folders-with-tests": { - "version": "1.4.0", + "version": "1.4.1", "depth": 0, "source": "registry", "dependencies": {},