Open IanMoroney opened 1 year ago
@FejZa , have you seen this issue before?
Upvote... same issue
https://github.com/Dinomite-Studios/unity-azure-pipelines-tasks/issues/223
Looks to be the same thing. Looking into it.
Any updates on this?
unityProjectPath
is a relative path from the $(Build.SourcesDirectory)
and a compile-time string. You can use a string, or compile time expansion syntax e.g. ${{variables.projectPath}}
NB: you should checkout your unity project in the pipeline... but you perhaps need to preserve the Unity Library files etc https://github.com/o-litnon/AzurePipelineUnityTasks/blob/350f90f974d34eaf8b781921a484f203b87019e6/azure-pipelines.yml#L33
Found a workaround in the discord by TheRpgEngineer#6915 You have to use the GetProjectVersion task first, and then pass the version as an argument to the tasks. Example:
- task: UnityGetProjectVersionTask@1
name: projectversion
- task: UnityTestTask@1
name: unitytest
inputs:
unityProjectPath: $(System.DefaultWorkingDirectory)
testResultsPath: $(System.DefaultWorkingDirectory)/TestResults
unityVersion: $(projectversion.projectVersion)
testMode: editMode
testCategory: '!PlayMode'
- task: UnityCMDTask@1
name: unitycmd
inputs:
unityVersion: $(projectversion.projectVersion)
unityProjectPath: $(System.DefaultWorkingDirectory)
cmdArgs: -executeMethod FirstLight.Editor.EditorTools.BackendMenu.MoveBackendDlls
@FejZa , it doesn't look like unityVersion
is a documented input for UnityTestTask
, let alone a required field.
Should this be added to the docs, and now marked as a required field?
I've also updated the docs here: https://github.com/Dinomite-Studios/unity-azure-pipelines-tasks-docs/pull/17
I’m seeing this same issue. Interestingly it works just fine on one Azure DevOps org and then fails in another with the exact same code 😐
So, trying to use the example in the docs, and I get the error: The "path" argument must be of type string. Received type undefined when trying to run the task.
This is the debug output from the task:
According to the docs, there isn't an input called
path
. According to the code, unity-test.ts does refer topath
and it joins it withtask.json
. However, in the above debug output, you can see thecheck path
running which shows a full path to the task.json, so I don't know exactly what's going wrong here.I assume i'm not missing any required input parameter, and my build environment is fine. If i'm missing something, can you let me know what it is?
YAML: