-
-
Couldn't load subscription status.
- Fork 144
Description
Hi!
First of all, thanks to you and all contributors for this repository ❤️
Background
I'm currently open sourcing some Unity packages (tools etc.) from our company to be used with the new Unity Package Manager.
I'm using this repository's action to run tests for those packages.
- Package I'm currently developing: https://github.com/3d-group/unity-simple-notifications (open source)
- Unity docs on custom packages: https://docs.unity3d.com/Manual/CustomPackages.html
Problem
It seems like Unity requires an Unity project to run tests.
To circumvent this problem I created an empty Unity project at my repository and ignored it with .npmignore file and just ran tests there using the projectPath variable.
But I cannot help thinking that it is a bit silly to include empty Unity project just for running tests 😄
Suggested solution
I think this could be automated and included in this action like so:
- Check if there is package.json in project root in order to detect if project is an upm (unity package manager) package.
or perhaps this could be told via env variable? - Create new Unity project (either copy it from somewhere or download from Unity website?)
- Edit manifest.json at UnityProject/Packages/
Add following lines to dependencies and testables sections:
{
"dependencies": {
"com.company.package": "https://github.com/company/repository.git"
},
"testables": [ "com.company.package" ]
}Perhaps Unity project could also be cached for future action runs?