Skip to content

Instantly share code, notes, and snippets.

@korinVR
Last active February 1, 2020 15:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save korinVR/25dcf74b8cc705b60dbcfb7d5b65aac2 to your computer and use it in GitHub Desktop.
Save korinVR/25dcf74b8cc705b60dbcfb7d5b65aac2 to your computer and use it in GitHub Desktop.
Running Unity tests Jenkinsfile
def unity = 'C:\\Program Files\\Unity\\Hub\\Editor\\2019.3.0f6\\Editor\\Unity.exe'
pipeline {
agent any
triggers {
pollSCM('H/5 * * * *')
}
stages {
stage('Test') {
steps {
script {
try {
bat "\"${unity}\" -batchmode -runTests -testPlatform PlayMode -testResults TestResult-PlayMode.xml -logFile"
} catch (error) {
}
try {
bat "\"${unity}\" -batchmode -runTests -testPlatform EditMode -testResults TestResult-EditMode.xml -logFile"
} catch (error) {
}
}
}
}
}
post {
always {
nunit testResultsPattern: 'TestResult-PlayMode.xml,TestResult-EditMode.xml'
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment