mirror of
https://github.com/game-ci/unity-test-runner.git
synced 2026-01-28 21:59:06 +08:00
v1
Unity - Test runner
Github Action to run tests for any Unity project.
This is a recommended step to prepare your pipeline for using the Build action from the Unity Actions collection.
Requires the activation step.
Usage
Create or edit the file called .github/workflows/activation.yml and add a job to it.
name: Test project
on: [push]
jobs:
testRunnerInAllModes:
name: Test all modes ✨
runs-on: ubuntu-latest
steps:
Configure the test runner as follows:
# Configure test runner
- name: Run tests
id: myTestStep
uses: webbertakken/unity-test-runner@v1
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
# Choose: "all", "playmode", "editmode"
TEST_MODE: all
# Optional: Path to your project, leave blank for "./"
UNITY_PROJECT_PATH: relative/path/to/your/project
# Optional: Artifacts path, leave blank for "artifacts"
ARTIFACTS_PATH: store/artifacts/here
You use the id to upload the artifacts like so:
# Upload artifacts
- name: Upload test results
uses: actions/upload-artifact@v1
with:
name: Test results
path: ${{ steps.myTestStep.outputs.artifactsPath }}
Commit and push your workflow definition.
More actions
Visit Unity Actions to find related actions for Unity.
Languages
TypeScript
80.2%
C#
18.6%
Handlebars
0.6%
JavaScript
0.4%
Shell
0.2%