diff --git a/Tools/CI/service.cmb/README.md b/Tools/CI/service.cmb/README.md index e50f68b86b..97079d3393 100644 --- a/Tools/CI/service.cmb/README.md +++ b/Tools/CI/service.cmb/README.md @@ -1,6 +1,6 @@ # Testing against the CMB Service -The CMB Service is a tool that is external to our repository. The tool is inside the `runtime` folder in the [mps-common-multiplayer-backend](https://github.com/Unity-Technologies/mps-common-multiplayer-backend) repository. +The CMB Service is a tool that is external to our repository. The tool is inside the `runtime` folder of the [CMB service](https://github.com/Unity-Technologies/unity-player-services/tree/main/services/common-multiplayer-backend) in the Unity Player Services monorepo. Due to this, there is some more setup needed when running tests against the CMB Service. @@ -56,3 +56,7 @@ The following environment variables allow for further configuration of the setup `CMB_SERVICE_PORT` defines the port where the tests will try to connect to the service (defaults to `7789`). `NGO_HOST` defines the http address where the tests will try to connect to the service (defaults to `127.0.0.1`). + +## Running on CI (Yamato) + +The CMB tests can also be run from Yamato. The jobs are defined in [`.yamato/cmb-service-standalone-tests.yml`](../../../.yamato/cmb-service-standalone-tests.yml) and appear in Yamato as `CMB Service Test - NGO - [, , ]`. The job can be triggered manually from any branch meaning it can be easier to run the CMB tests from Yamato rather than set them up locally. The test uses [`run_cmb_service.sh`](./run_cmb_service.sh) to setup and run the CMB service. diff --git a/Tools/CI/service.cmb/run_cmb_service.sh b/Tools/CI/service.cmb/run_cmb_service.sh index 4bcf8c7468..8dd26df88a 100755 --- a/Tools/CI/service.cmb/run_cmb_service.sh +++ b/Tools/CI/service.cmb/run_cmb_service.sh @@ -17,7 +17,7 @@ # Example usage: # .//run_cmb_service.sh -e 7788 -s 7799 - # This script is currently used in the desktop-standalone-tests yamato job. + # This script is currently used in the cmb-service-standalone-tests yamato job (found at ../../../.yamato/cmb-service-standalone-tests.yml). # TECHNICAL CONSIDERATIONS--------------------------------------------------------------- # This is a bash script and so needs to be run on a Unix based system. @@ -136,11 +136,14 @@ else logMessage "Protocol Buffer Compiler Installed & ENV variables verified!\n PROTOC path is: $PROTOC" fi -# clone the cmb service repo -git clone https://github.com/Unity-Technologies/mps-common-multiplayer-backend.git +# Sparse-checkout only the CMB service directory from the unity-player-services monorepo. +# --filter=blob:none + --depth 1 avoids downloading file contents and history for the rest of the monorepo. +git clone --depth 1 --filter=blob:none --sparse https://github.com/Unity-Technologies/unity-player-services.git +cd ./unity-player-services +git sparse-checkout set services/common-multiplayer-backend/runtime # navigate to the cmb service directory -cd ./mps-common-multiplayer-backend/runtime +cd ./services/common-multiplayer-backend/runtime # Install rust curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y