-
Notifications
You must be signed in to change notification settings - Fork 120
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
Convert to a Unity project and add tests #308
base: canary
Are you sure you want to change the base?
Conversation
have not checked it out yet, but I like this change. some questions, from a quick observation:
|
Same here, just been glancing over the PR. I like the idea and I believe we should convert the repo back to a Unity project. Some thoughts:
|
Good questions. The directory structure of 'Packages' or the contained package.json files have not changed, so I believe it should work. I opened up Package Manager in Unity and it lists the Unity Atoms packages correctly there. That's why I didn't add them to the manifest file. Any packages with tests in them do need to be added into 'testables' in the manifest file though. |
I like this proposition, the structure in the PR looks a little off with the varying casing of the directories. I'll change it and follow the instructions as recommended by Unity. I think it's gonna look tidy when done. |
d314f37
to
8bf8879
Compare
Alright, looks a bit different again. Should work all the same though. |
5f56e94
to
c6a6841
Compare
c6a6841
to
48f6ec0
Compare
Ready to go 👍 |
7191190
to
f30394e
Compare
Moved Unity project to a new directory and edited relevant files to match the change.
Needed a non-sealed specific AtomVariable for testing purposes. NSubstitute does not work well with sealed classes.
5561ba5
to
cf339be
Compare
Sorry the update took this long, should be free of conflicts now |
This PR will turn the repo into a Unity project so that tests can be automated with GitHub Actions. The PR comes with a working GitHub workflow file.
Changing the structure to a Unity project will not bother openupm, because, from openupm docs:
"The master branch is usually a Unity project (with Assets folder). The package.json file is located at a sub-folder, for example Assets/package-name or Packages/com.namespace.package-name. Git tags are based on the master branch. Build pipelines will detect the location of the package.json file, and handle it correctly."
An admin with access to Secrets of the repo will have to add a Unity license as a secret called UNITY_LICENSE. This license can also be encrypted for extra security.
Use the Test Runner to run the sample tests. If IntelliSense is not working for you, try regenerating all project files from "Preferences > External Tools" in Unity with "Embedded packages" ticked.