Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/test-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
20 changes: 14 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,19 @@ public async Task Unity6000_2_6f1から6000_5_0f1まで_TestFrameworkはv1_6_0
}

[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"));
}
}
}
2 changes: 1 addition & 1 deletion Packages/manifest.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion Packages/packages-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {},
Expand Down
Loading