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 #104

Merged
merged 3 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
9 changes: 7 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,13 @@ jobs:
- 2022.3.42f1
- 2023.2.20f1
- 6000.0.20f1
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: Crete project for tests
Expand Down Expand Up @@ -94,11 +98,12 @@ jobs:
with:
githubToken: ${{ secrets.GITHUB_TOKEN }}
unityVersion: ${{ matrix.unityVersion }} # Default is `auto`
checkName: test result (${{ matrix.unityVersion }})
checkName: test result (${{ matrix.unityVersion }}, ${{ matrix.testMode }})
projectPath: ${{ env.CREATED_PROJECT_PATH }}
customParameters: -testCategory "!IgnoreCI" -testHelperScreenshotDirectory /github/workspace/artifacts/Screenshots
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
testMode: ${{ matrix.testMode }}
env:
UNITY_LICENSE: ${{ secrets[env.secret_key] }}
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
Expand All @@ -118,7 +123,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
1 change: 1 addition & 0 deletions Tests/Runtime/Attributes/TakeScreenshotAttributeTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ namespace TestHelper.Attributes
{
[TestFixture]
[GameViewResolution(GameViewResolution.VGA)]
[UnityPlatform(RuntimePlatform.OSXEditor, RuntimePlatform.WindowsEditor, RuntimePlatform.LinuxEditor)]
public class TakeScreenshotAttributeTest
{
private const string TestScene = "Packages/com.nowsprinting.test-helper/Tests/Scenes/ScreenshotTest.unity";
Expand Down
Loading