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 Builder v4 Parity Docs for Test Runner #442

Merged
merged 2 commits into from
Dec 13, 2023
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
8 changes: 8 additions & 0 deletions docs/03-github/01-getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ jobs:
uses: game-ci/unity-test-runner@v4
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
with:
githubToken: ${{ secrets.GITHUB_TOKEN }}

Expand Down Expand Up @@ -168,6 +170,8 @@ jobs:
uses: game-ci/unity-test-runner@v4
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
with:
githubToken: ${{ secrets.GITHUB_TOKEN }}

Expand Down Expand Up @@ -223,6 +227,8 @@ jobs:
uses: game-ci/unity-test-runner@v4
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
with:
githubToken: ${{ secrets.GITHUB_TOKEN }}

Expand Down Expand Up @@ -316,6 +322,8 @@ jobs:
id: testRunner
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
with:
projectPath: ${{ matrix.projectPath }}
unityVersion: ${{ matrix.unityVersion }}
Expand Down
42 changes: 42 additions & 0 deletions docs/03-github/03-test-runner.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,44 @@ Isolation mode to use for the Docker container when running on Windows. Can be o

_**required:** `false`_ _**default:** `"default"`_

#### containerRegistryRepository

Container registry and repository to pull the image from. Only applicable if `customImage` is not
set.

This allows you to host your own images and still leverage the logic to automatically determine the
editor version and target platform. Accepts images from other registries too, for example
`ghcr.io/namespace/imagename` for Github Container Registry.

_**required:** `false`_ _**default:** `"unityci/editor"`_

#### containerRegistryImageVersion

Container registry image version. Only applicable if `customImage` is not set.

This allows you to roll back the image version to a previous version if needed or even use your own
version numbering for custom built and maintained registries.

_**required:** `false`_ _**default:** `"3"`_

#### runAsHostUser

Run the container as the host user based on the file permissions of the cloned project that gets
mounted to the container. This is useful if you are using a self-hosted runner and need the
generated files from the container to be owned by the same user as the runner host. This solves most
permission errors without requiring the runner agent to run as root. This option shouldn't be needed
on Github Hosted runners as the systems are automatically wiped each run so we default to `false`.
Self-Hosted runners generally will want to set this to `true`.

_**required:** `false`_ _**default:** `false`_

#### chownFilesTo

User and optionally group (user or user:group or uid:gid) to give ownership of the resulting build
artifacts.

_**required:** `false`_ _**default:** `""`_

## Complete example

A complete workflow that tests all modes separately could look like this:
Expand Down Expand Up @@ -486,6 +524,8 @@ jobs:
id: tests
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
with:
projectPath: ${{ matrix.projectPath }}
testMode: ${{ matrix.testMode }}
Expand Down Expand Up @@ -536,6 +576,8 @@ jobs:
id: tests
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
with:
packageMode: true
projectPath: ${{ matrix.projectPath }}
Expand Down