Skip to content
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

ci: NGO CI update and rewrite #3193

Draft
wants to merge 15 commits into
base: develop-2.0.0
Choose a base branch
from

Conversation

michalChrobot
Copy link
Contributor

@michalChrobot michalChrobot commented Jan 6, 2025

This PR contains a rewrite of CI present for NGO package. Below there is an overview of all changes, this is still work in progress since not all of the tests are passing. Worth noting is that there are quite a few comments added in each file explaining what it does exactly, and why, so the PR description will be more about higher level stuff.

  • .yamato/multiprocess-project-tests.yml

After consulting with @NoelStephensUnity the conclusion was that NGO is not using Multiprocess tests so those were removed.

  • .yamato/project-promotion.yml and .yamato/project-publish.yml

Those were removed since the release process changed and currently we use jobs present in wrench folder for package publishing and validation (described at the bottom of this summary together with other wrench jobs to showcase additional tests that are part of this CI)

  • .yamato/project-updated-dependencies-test.yml

This definition contained 2 trigger jobs.

First one was performing updated-dependencies-tests (which means that it was updating all package dependencies to the latest ones and running package tests). Currently we also plan to integrate renovate bot into this repository which will automatically detect dependencies that can be updated, create a PR with the update and package tests will run on it. In essence the difference is that Renovate will perform dependency updates and tests "one at a time" instead of all at the same time (worth noting that the test itself won't update the dependency but the bot will) but it should allow us to constantly use the latest dependencies so I would argue that this job won't be that necessary.

The second was a job using izon which is now "end-of-life" (same think with Badges trigger in .yamato/triggers) so there should be a discussion what we want to do about badges (for generation of which izon is used)

  • .yamato/project.metafile

This file was rewritten in bigger part, the points to note are the following:

  1. small_agent_platform was created for definition of the test machine for jobs that for example doesn't require editor and are small (like pack job)
  2. test_platforms (which were desktop platforms) were expanded by adding sections like: default (platform to use when no specific platform is needed), desktop (desktop platforms), mobile_build and mobile_test (mobile definitions), console_build and console_test (console definitions)
  3. projects was shortened and some unused fields were removed
  4. Instead of having testeditors on per project basis there is now default validation editor (trunk) and other relevant test editors (for NGO v2.0.0 it's 6000.0+)
  5. win_il2cpp_test_image was removed since it wasn't relevant anymore
  • .yamato/package-pack.yml

Separate package-pack definition file was added. It's equivalent to wrench/package-pack-jobs and it packs the package and performs PVP checks on it.

  • .yamato/project-pack.yml

This definition was unified with the other in a sense that all machine definitions are present in project.metafile. Additional job of packing minimalproject with dependency of [email protected] (from old project.metafile) was removed since it would be out of date and in my understanding (as per previously mentioned Renovate bot) we should be able to keep latest dependency in projects (but I'm open to discussion if I'm wrong and this shouldn't be removed)

  • .yamato/package-tests.yml

This was minimally modified, for example the test will run only on default project (since we are testing package so there should be no difference of what project is used as a context). This is performed on all desktop platforms (all where editor can be used)

  • .yamato/project-tests.yml

Minimally rewritten similarly to package-tests. Ii will execute project tests for all projects that are marked with has_tests=true

  • .yamato/project-standards.yml

Modified in a way that it will run standards check on all projects (instead only on the first one). Here we mostly care about standards in the package which will be checked in any of projects but it's also nice to know if other projects are conforming to the standards

  • .yamato/code-coverage.yml

Not much changed here. This job runs package test with code coverage measurement enabled. It's automatically triggered once per week by trigger jobs definition. The results are not shared internally since it's not supported for public repositories.

  • .yamato/webgl-build.yml

Also here the functionality stayed mostly the same. It will perform build phase for WebGL and no tests since it's not really feasible right now to run server for such build.

  • .yamato/standalone-project-tests.yml was replaced by .yamato/desktop-standalone-tests.yml

The definition (beside some different writing) stayed mostly the same and those jobs are created for each supported editor for each desktop platform.

  • .yamato/mobile-build-and-test.yml was replaced by .yamato/mobile-standalone-test.yml

The definition (beside some different writing) stayed mostly the same and those jobs are created for each supported editor for each desktop platform.

  • .yamato/console-standalone-test.yml

This is a completely new job since there were no console tests set up before for NGO package

  • .yamato/performance-tests.yml

This is a completely new job since there were no performance tests set up before for NGO package. Worth noting is the fact that currently NGO doesn't have any performance tests in place (so this job will always fail with "no tests selected" error) but it's still nice to have this job for future when there will be performance tests. Because of this, this job will not be triggered by any trigger jobs.

  • .yamato/_run-all.yml

It was modified in a sense that it runs jobs in current configuration. Worth noting is that there are jobs to run all given tests (for example mobile) or all but while only using default editor (trunk). This is useful for triggers defined in .yamato/_triggers.yml

  • .yamato/_triggers.yml

First of all "Badges Tests Trigger" was removed because izon is end-of-life as mentioned also in .yamato/project-updated-dependencies-test.yml.

Pull Request Trigger was modified to run only on valid branches (there is no master branch) . For now it will run project-standards, preview-a-p-v, api-validation-jobs and all package and project tests.

Run Multiprocess Tests trigger was removed since there are no multiprocess jobs anymore

[Nightly] Run All Tests was modified to run same subset as pull_request_trigger with addition of mobile/desktop/console tests and webgl builds while running on trunk (default editor)

[Weekly] Run All Tests was modified to run same subset as develop_nightly but runs per all supported editors as well as executes code coverage test and runs project standards per project

  • Summary of Wrench jobs

Those jobs were created before this PR but I will summarize those just to have a full overview of jobs possible to use. All of those are present under .yamato/wrench folder:

  • api-validation-jobs --> This job validates package API to make sure that there are no breaking changes when major package version is not bumped.
  • package-pack-jobs --> Equivalent to .yamato/package-pack.yml but due to wrench dependencies it was kept and .yamato/package-pack.yml is used for other test jobs.
  • preview-a-p-v --> This job validates if our package changes are not breaking dependents of our package
  • promotion-jobs --> This is equivalent to removed promotion and publish jobs
  • validation-jobs --> Jobs validating PVP checks as well as EditMode and PlayMode tests on different platforms

@michalChrobot michalChrobot self-assigned this Jan 6, 2025
@michalChrobot michalChrobot mentioned this pull request Jan 8, 2025
@michalChrobot michalChrobot changed the title NGO CI update and rewrite ci: NGO CI update and rewrite Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant