Provides a command line parser and options to set editor, build, player, and other Unity settings when running Unity from the command line
Перейти к файлу
Sean Stolberg fb0d89a887 Increase unit test coverage for easier refactoring (#33)
Add unit tests, using MOQ when needed, to ensure we have unit tests around all the important areas of the package include CLI option mapping, decision statements, etc.
2023-05-19 17:52:32 -07:00
.github Increase unit test coverage for easier refactoring (#33) 2023-05-19 17:52:32 -07:00
.yamato Increase unit test coverage for easier refactoring (#33) 2023-05-19 17:52:32 -07:00
ConfigureProject Revert change to remove xr setup (#32) 2023-05-09 09:36:39 -07:00
ConfigureXRProject Revert change to remove xr setup (#32) 2023-05-09 09:36:39 -07:00
Documentation~ Documentation folder was being ignored by gitignore 2020-09-22 15:48:51 +02:00
Editor Increase unit test coverage for easier refactoring (#33) 2023-05-19 17:52:32 -07:00
Tests Increase unit test coverage for easier refactoring (#33) 2023-05-19 17:52:32 -07:00
.gitignore Documentation folder was being ignored by gitignore 2020-09-22 15:48:51 +02:00
.gitmodules creation 2020-05-09 18:44:16 -07:00
.npmignore creation 2020-05-09 18:44:16 -07:00
CHANGELOG.md Increase unit test coverage for easier refactoring (#33) 2023-05-19 17:52:32 -07:00
CHANGELOG.md.meta creation 2020-05-09 18:44:16 -07:00
CODEOWNERS Adding codeowners file (#29) 2023-04-07 10:57:00 -07:00
CODEOWNERS.meta Increase unit test coverage for easier refactoring (#33) 2023-05-19 17:52:32 -07:00
CONTRIBUTING creation 2020-05-09 18:44:16 -07:00
CONTRIBUTING.meta creation 2020-05-09 18:44:16 -07:00
CONTRIBUTIONS.md creation 2020-05-09 18:44:16 -07:00
CONTRIBUTIONS.md.meta creation 2020-05-09 18:44:16 -07:00
ConfigureProject.meta Revert change to remove xr setup (#32) 2023-05-09 09:36:39 -07:00
ConfigureXRProject.meta Revert change to remove xr setup (#32) 2023-05-09 09:36:39 -07:00
Editor.meta creation 2020-05-09 18:44:16 -07:00
LICENSE.md creation 2020-05-09 18:44:16 -07:00
LICENSE.md.meta creation 2020-05-09 18:44:16 -07:00
README.md Increase unit test coverage for easier refactoring (#33) 2023-05-19 17:52:32 -07:00
README.md.meta creation 2020-05-09 18:44:16 -07:00
Tests.meta prepare package for publish 2020-09-17 14:35:44 +02:00
Third Party Notices.md creation 2020-05-09 18:44:16 -07:00
Third Party Notices.md.meta creation 2020-05-09 18:44:16 -07:00
package.json Increase unit test coverage for easier refactoring (#33) 2023-05-19 17:52:32 -07:00
package.json.meta creation 2020-05-09 18:44:16 -07:00

README.md

com.unity.cli-project-setup

Provides a command line parser and options to set editor, build, player, and other Unity settings when running Unity from the command line

Developer Guide

In order to contribute to the com.unity.cli-project-setup package, do the following

  1. Clone this git repository to your local machine

  2. Choose a test project to include the com.unity.cli-project-setup package in while developing and debugging it.

    1. Add the package to the dependencies section of the project manifest, using a local reference syntax like this but using the location that is specific to your machine

      "com.unity.cli-project-setup": "file:D:/com.unity.cli-project-setup"
      
    2. The com.unity.cli-project-setup package requires the com.unity.test.metadata-manager package as a dependency, so you'll need to include this in one of three ways:

      1. Add a local reference: Clone the com.unity.test.metadata-manager locally like you did for this package in the first step, and add a local dependency reference to it.
      "com.unity.test.metadata-manager": "file:D:/com.unity.test.metadata-manager"
      
      1. Add a scoped registry section to your project manifest: The com.unity.test.metadata-manager is published to the internal, upm-candidates package registry. If your project needs to use the production (non-internal) Unity package registry, you'll need to add a scopedRegistry section to your project manifest in order to access it
      "scopedRegistries": [
        {
          "name": "Internal Candidate Registry",
          "url": "https://artifactory.prd.it.unity3d.com/artifactory/api/npm/upm-candidates",
          "scopes": [
            "com.unity.test.metadata-manager"
           ]
        }
      ],
      
      1. Update the project manifest to use the internal package registry exlusively: If using the internal, upm-candidates, registry is acceptable for your project, just ensure you have this entry in the project manifest.
      "registry": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates"
      
      1. Add the MOQ mocking framework package to your project manifest.
      "nuget.moq": "2.0.0-pre.2"
      
  3. Add com.unity.cli-project-setup to the project manifest's "testables" section. This will ensure the unit tests can be seen and run from the editor's test runner tab

"testables": [
    "com.unity.cli-project-setup"
  ]

If you've setup up everything correctly, you should now see the tests from the EditMode tab of the Unity editor test runner tab.

Testing changes

This package is used broadly across Graphics and XR testing. Following is a procedure for verifying changes and keeping broader support in mind.

  • Verify your own use cases.
  • Verify that the "Pack and test all packages" yamato job passes for your branch.
  • Verify that any other checks for this repo have passed on your PR.
  • Update the changelog and package.json to indicate a new version. To start, also postfix "-preview.1" to your candidate version. Run the "Publish CliProjectSetup" yamato job.
  • Create branches for the packages unity.graphictests.performance.universal and com.unity.testing.graphics-performance. Change the package.json for each package to indicate dependency on your candidate version of this package.
  • In the Graphics repo, make a new branch and edit lines 36 and 37 of this file to point to the branches in the previous step (eg add #your-branch-name to the end of the git url).
  • Clone the Graphics repository
  • Clone the gfx-sdet-tools repository and run the yml generator script targeting the Graphics repo (or ask a graphics SDET for help).
  • Run the "VikingVillage_URP PR Job - trunk" yamato job on my Graphics repo branch. Verify all tests pass
  • If all tests pass, remove the ".1" or "preview.1" postfix to match the previously released version's convention. Run the "Publish CliProjectSetup" yamato job.
  • Merge your PR
  • Create PRs for the packages unity.graphictests.performance.universal and com.unity.testing.graphics-performance. Change the package.json for each package to indicate dependency on your newly published version of this package.