Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
box

GitHub Action

Unity Runner

2.0.0

Unity Runner

box

Unity Runner

Run unity in batch mode

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Unity Runner

uses: MirageNet/unity-runner@2.0.0

Learn more about this action in MirageNet/unity-runner

Choose a version

Unity - Runner

Actions status


GitHub Action to run unity for any Unity project.


This is a recommended step to prepare your pipeline for using the Build action. This action also requires the activation step.

Documentation

See the Unity Actions collection repository for workflow documentation and reference implementation.

Usage

Create or edit the file called .github/workflows/main.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.1
        env:
          # Choose: "all", "playmode", "editmode"
          TEST_MODE: all
          
          # Optional: Path to your project, leave blank for "./"
          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.

Feel free to contribute.

Licence

MIT