Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add run tests on standalone player #32

Merged
merged 2 commits into from
Oct 26, 2024
Merged
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
10 changes: 8 additions & 2 deletions .github/workflows/test-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ jobs:
- 2022.3.42f1
- 2023.2.20f1
- 6000.0.22f1
testMode:
- All # run tests in editor
include:
- unityVersion: 2023.2.20f1
testMode: Standalone # run tests on player

steps:
- name: Checkout repository
Expand Down Expand Up @@ -72,10 +77,11 @@ jobs:
with:
githubToken: ${{ secrets.GITHUB_TOKEN }}
unityVersion: ${{ matrix.unityVersion }} # Default is `auto`
checkName: test result (${{ matrix.unityVersion }})
checkName: test result (${{ matrix.unityVersion }}, ${{ matrix.testMode }})
customParameters: -testCategory "Integration"
coverageOptions: generateAdditionalMetrics;generateTestReferences;generateHtmlReport;generateAdditionalReports;dontClear;assemblyFilters:${{ env.assembly_filters }}
# see: https://docs.unity3d.com/Packages/[email protected]/manual/CoverageBatchmode.html
testMode: ${{ matrix.testMode }}
env:
UNITY_LICENSE: ${{ secrets[env.secret_key] }}
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
Expand All @@ -85,7 +91,7 @@ jobs:
- name: Upload test results
uses: actions/upload-artifact@v4
with:
name: TestResults-Unity${{ matrix.unityVersion }}
name: TestResults-Unity${{ matrix.unityVersion }}-${{ matrix.testMode }}
path: |
${{ steps.test.outputs.artifactsPath }}
${{ steps.test.outputs.coveragePath }}
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,13 @@ jobs:
- 2022.3.42f1
- 2023.2.20f1
- 6000.0.22f1
testMode:
- All # run tests in editor
include:
- unityVersion: 2019.4.40f1
octocov: true
- unityVersion: 2023.2.20f1
testMode: Standalone # run tests on player

steps:
- name: Checkout repository
Expand Down Expand Up @@ -76,10 +80,11 @@ jobs:
with:
githubToken: ${{ secrets.GITHUB_TOKEN }}
unityVersion: ${{ matrix.unityVersion }} # Default is `auto`
checkName: test result (${{ matrix.unityVersion }})
checkName: test result (${{ matrix.unityVersion }}, ${{ matrix.testMode }})
customParameters: -testCategory "!IgnoreCI;!Integration"
coverageOptions: generateAdditionalMetrics;generateTestReferences;generateHtmlReport;generateAdditionalReports;dontClear;assemblyFilters:${{ env.assembly_filters }}
# see: https://docs.unity3d.com/Packages/[email protected]/manual/CoverageBatchmode.html
testMode: ${{ matrix.testMode }}
env:
UNITY_LICENSE: ${{ secrets[env.secret_key] }}
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
Expand All @@ -97,7 +102,7 @@ jobs:
- name: Upload test results
uses: actions/upload-artifact@v4
with:
name: TestResults-Unity${{ matrix.unityVersion }}
name: TestResults-Unity${{ matrix.unityVersion }}-${{ matrix.testMode }}
path: |
${{ steps.test.outputs.artifactsPath }}
${{ steps.test.outputs.coveragePath }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using NUnit.Framework;
using NUnit.Framework.Constraints;
using UnityEngine;
using UnityEngine.TestTools;

// ReSharper disable AccessToStaticMemberViaDerivedType

Expand Down Expand Up @@ -34,6 +35,7 @@ public void CustomConstraint_Constraintの実装だけで可能な書きかた()
}

[Test]
[UnityPlatform(RuntimePlatform.OSXEditor, RuntimePlatform.WindowsEditor, RuntimePlatform.LinuxEditor)]
public void CustomConstraint_Extensionsの実装も行なうと可能な書きかた()
{
var actual = CreateDestroyedObject();
Expand Down
Loading