Unity PR Bot
GitHub App
Unity PR Bot
GitHub App
Continuous Integration for Unity projects using the Unity Cloud Build feature.
Unity Cloud Build can build our project automatically when we commit to a branch, but a problem it has is that it does not support making builds for Pull Request.
Fear not, for Unity PR Bot is here.
This app solves that problem
When you create a PR, Unity PR Bot reads the config file, generates a temporal config in Unity Cloud and starts a build.
Once this build is finished, it will report it in a status check:
Perfect tool for integrating continuous testing in your pull requests!
Once the PR has been merged, the build configuration gets automatically deleted, so there is no clutter in your build system.
Requirements
You need two things to make this app work:
- Unity Pro or Teams Advanced subscription.
- Your Pull Request must be in the same repository. Unity Cloud does NOT support forks.
Configuration
Set API key
First, you need to add your Unity Cloud API key in our website:
Unity PR Bot Dashboard
Set the configuration file
Unity Cloud Status Check always looks for the file .github/unity-ci.json
.
If this file does not exist, it will not trigger the status check.
You can generate this file using our tool.
This file is a json with the following types:
{
// required
orgId: string;
// required
projectId: string;
// required
buildPlatform: string;
preExportMethod: string;
postExportMethod: string;
preBuildScript: string;
postBuildScript: string;
unityVersion: string;
autoDetectUnityVersion: boolean;
useClosestVersion: boolean;
scriptingDefineSymbols: string;
runTests: boolean;
failedTestFailsBuild: boolean;
cleanBuild: boolean;
delayBeforeBuild: number;
}
orgId
Your organization ID, you can find it in the URL of Unity’s developer dashboard: https://dashboard.unity3d.com/organizations/ORG-ID/projects/
.
projectId
Your project ID, you can find it as Project ID
in the Overview tab of your project in the developers dashboard.
buildPlatform
The platform to evaluate, the options are ios
, android
, webplayer
, webgl
, standaloneosxintel
, standaloneosxintel64
, standaloneosxuniversal
, standalonewindows
, standalonewindows64
, standalonelinux
, standalonelinux64
, standalonelinuxuniversal
.
If you don’t fill this field, it will default to standalonewindows64
.
unityVersion
latest
or a unity dot version with underscores (ex. 4_6_5
).
Default: null
.
autoDetectUnityVersion
If it should autodetect the unity version. If false it will use the version set in unityVersion.
Default: true
useClosestVersion
If auto detect is on, and the current version is not available yet, use the closest version possible. (Ex.: If 2019.2.11f is not available, use 2019.2.10f)
Default: true
runTests
If the build should run the tests. Defaults to false
.
failedTestFailsBuild
Fail the build if one of the tests fails. Defaults to false
.
preExportMethod, postExportMethod, preBuildScript & postBuildScript
Scripts executed before or after the build starts. It’s an optional parameter.
scriptingDefineSymbols
Scripting Define Symbols that should be configured for the build.
cleanBuild
If every build should be a clean one. Defaults to false
.
Note: the first build for every PR is always a clean build. If set to false, a second build will be a dirty one.
delayBeforeBuild
How many seconds the build should delay before starting. Defaults to 0.
Developer
Unity PR Bot is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.
Report abuse