From 74f097432847c48040a5faefd4868878fc60d421 Mon Sep 17 00:00:00 2001 From: Nikos Chagialas Date: Mon, 19 May 2025 10:31:45 +0100 Subject: [PATCH 1/6] Made Codecov check on PRs informational --- .github/codecov.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/codecov.yml b/.github/codecov.yml index bf5d7de884..9f4821c944 100644 --- a/.github/codecov.yml +++ b/.github/codecov.yml @@ -18,7 +18,7 @@ coverage: threshold: 1% base: auto if_ci_failed: success - informational: false + informational: true only_pulls: true comment: From 297357fe8fadf6bd7dffde61ff5e7b8ed757c043 Mon Sep 17 00:00:00 2001 From: Nikos Chagialas Date: Mon, 19 May 2025 10:32:37 +0100 Subject: [PATCH 2/6] Upload reports to Codecov from Mac/Linux functional jobs too --- .yamato/upm-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.yamato/upm-ci.yml b/.yamato/upm-ci.yml index b705d9b170..06750f210e 100644 --- a/.yamato/upm-ci.yml +++ b/.yamato/upm-ci.yml @@ -76,7 +76,7 @@ - mv ./Assets/Samples.meta ./Packages/com.unity.inputsystem - upm-ci package pack --package-path ./Packages/com.unity.inputsystem/ # Run upm-ci verification tests as well as tests contained in the package. - - upm-ci package test --package-path ./Packages/com.unity.inputsystem/ -u $EDITOR_VERSION {% if category.name == "functional" and platform.name == "mac" or platform.name == "linux" %} --enable-code-coverage --code-coverage-options "generateAdditionalMetrics;generateHtmlReport;assemblyFilters:+Unity.InputSystem;pathReplacePatterns:@*,,Library/PackageCache,Packages" --extra-utr-arg="--coverage-results-path={{ yamato_source_dir_nix }}/upm-ci~/test-results/CodeCoverage/Package" {% endif %} + - upm-ci package test --package-path ./Packages/com.unity.inputsystem/ -u $EDITOR_VERSION {% if category.name == "functional" and platform.name == "mac" or platform.name == "linux" %} --enable-code-coverage --code-coverage-options "generateAdditionalMetrics;generateHtmlReport;assemblyFilters:+Unity.InputSystem;pathReplacePatterns:@*,,Library/PackageCache,Packages" --extra-utr-arg="--coverage-results-path={{ yamato_source_dir_nix }}/upm-ci~/test-results/CodeCoverage/Package --coverage-upload-options=\"reportsDir:upm-ci~/test-results/CodeCoverage/Package;name:{{platform.name}}_{{editor.version}}_pkg;flags:{{platform.name}}_{{editor.version}}_pkg\"" {% endif %} {% if platform.installscript %} - {{ unity_downloader_install }} - {{ platform.installscript }} $EDITOR_VERSION @@ -86,7 +86,7 @@ - mv ./Packages/com.unity.inputsystem/Samples ./Assets - mv ./Packages/com.unity.inputsystem/Samples.meta ./Assets # Now run our full test suite that sits in Assets/Tests by running UTR on our project. - - ./utr --testproject . --timeout=1200 --editor-location=.Editor --artifacts_path=upm-ci~/test-results/isolation-com.unity.inputsystem.tests --suite=playmode {% if platform.name == "mac" or platform.name == "linux"%} --suite=editor {% endif %} {% if category.name == "performance" %} --category=Performance {% else %} --category=!Performance {% endif %} --api-profile=NET_4_6 {% if platform.runtime %} --platform {{ platform.runtime }} {% endif %} {% if platform.scripting-backend %} --scripting-backend {{ platform.scripting-backend }} {% endif %} {% if category.name == "performance" %} --report-performance-data --performance-project-id=InputSystem {% endif %} {% if category.name == "functional" and platform.name == "mac" or platform.name == "linux" %} --enable-code-coverage --coverage-options="generateAdditionalMetrics;generateHtmlReport;assemblyFilters:+Unity.InputSystem" --coverage-results-path={{ yamato_source_dir_nix }}/upm-ci~/test-results/CodeCoverage/Project {% endif %} + - ./utr --testproject . --timeout=1200 --editor-location=.Editor --artifacts_path=upm-ci~/test-results/isolation-com.unity.inputsystem.tests --suite=playmode {% if platform.name == "mac" or platform.name == "linux"%} --suite=editor {% endif %} {% if category.name == "performance" %} --category=Performance {% else %} --category=!Performance {% endif %} --api-profile=NET_4_6 {% if platform.runtime %} --platform {{ platform.runtime }} {% endif %} {% if platform.scripting-backend %} --scripting-backend {{ platform.scripting-backend }} {% endif %} {% if category.name == "performance" %} --report-performance-data --performance-project-id=InputSystem {% endif %} {% if category.name == "functional" and platform.name == "mac" or platform.name == "linux" %} --enable-code-coverage --coverage-options="generateAdditionalMetrics;generateHtmlReport;assemblyFilters:+Unity.InputSystem" --coverage-results-path={{ yamato_source_dir_nix }}/upm-ci~/test-results/CodeCoverage/Project --coverage-upload-options="reportsDir:upm-ci~/test-results/CodeCoverage/Project;name:{{platform.name}}_{{editor.version}}_project;flags:{{platform.name}}_{{editor.version}}_project" {% endif %} # Merge all the code coverage results into one report. {% if platform.name == "mac" and category.name == "functional" %} - '{{ yamato_source_dir_nix }}/.Editor/Unity.app/Contents/MacOS/Unity -projectPath {{ yamato_source_dir_nix }} -batchmode -debugCodeOptimization -enableCodeCoverage -coverageResultsPath {{ yamato_source_dir_nix }}/upm-ci~/test-results/CodeCoverage/ -coverageOptions "generateAdditionalMetrics;generateHtmlReport;assemblyFilters:+Unity.InputSystem;sourcePaths:{{ yamato_source_dir_nix }}/Packages/com.unity.inputsystem/" -quit' From bc711f1f68a8c30b803246ad800ed85e813e4590 Mon Sep 17 00:00:00 2001 From: Nikos Chagialas Date: Mon, 19 May 2025 10:33:35 +0100 Subject: [PATCH 3/6] Trigger coverage jobs on merge/push to develop branch --- .yamato/upm-ci.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.yamato/upm-ci.yml b/.yamato/upm-ci.yml index 06750f210e..aae9b5689c 100644 --- a/.yamato/upm-ci.yml +++ b/.yamato/upm-ci.yml @@ -51,6 +51,11 @@ UTR_Output.zip: paths: - "upm-ci~/test-results/**/*" +{% if platform.name == "win" and category.name == "functional" %} + triggers: + expression: push.branch match "develop" + cancel_old_ci: true +{% endif %} {% endfor %} # test_category {% endfor %} # platforms_win @@ -104,6 +109,11 @@ UTR_Output.zip: paths: - "upm-ci~/test-results/**/*" +{% if category.name == "functional" and platform.name == "mac" or platform.name == "linux"%} + triggers: + expression: push.branch match "develop" + cancel_old_ci: true +{% endif %} {% endfor %} # test_category {% endfor %} # platforms_nix {% endfor %} # editors From 3b3e3aaec1fe15dfa8ec4ffc4725b903148ceb20 Mon Sep 17 00:00:00 2001 From: Nikos Chagialas Date: Mon, 19 May 2025 10:45:26 +0100 Subject: [PATCH 4/6] Removed the separate editor call to merge the coverage reports --- .yamato/upm-ci.yml | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/.yamato/upm-ci.yml b/.yamato/upm-ci.yml index aae9b5689c..1b593a3ab9 100644 --- a/.yamato/upm-ci.yml +++ b/.yamato/upm-ci.yml @@ -37,10 +37,8 @@ - move /Y .\Packages\com.unity.inputsystem\Samples.meta .\Assets # Now run our full test suite that sits in Assets/Tests by running UTR on our project. - ./utr --testproject . --timeout=1200 --editor-location=.Editor --artifacts_path=upm-ci~/test-results/isolation-com.unity.inputsystem.tests --suite=playmode {% if platform.name == "win" %} --suite=editor {% endif %} {% if category.name == "performance" %} --category=Performance {% else %} --category=!Performance {% endif %} --api-profile=NET_4_6 {% if platform.runtime %} --platform {{ platform.runtime }} {% endif %} {% if platform.scripting-backend %} --scripting-backend {{ platform.scripting-backend }} {% endif %} {% if category.name == "performance" %} --report-performance-data --performance-project-id=InputSystem {% endif %} {% if platform.name == "win" and category.name == "functional" %}--enable-code-coverage --coverage-options="generateAdditionalMetrics;generateHtmlReport;assemblyFilters:+Unity.InputSystem" --coverage-results-path={{ yamato_source_dir_win }}/upm-ci~/test-results/CodeCoverage/Project --coverage-upload-options="reportsDir:upm-ci~/test-results/CodeCoverage/Project;name:{{platform.name}}_{{editor.version}}_project;flags:{{platform.name}}_{{editor.version}}_project" {% endif %} - # Merge all the code coverage results into one report. {% if platform.name == "win" and category.name == "functional" %} - - '{{ yamato_source_dir_win }}/.Editor/Unity.exe -projectPath {{ yamato_source_dir_win }} -batchmode -debugCodeOptimization -enableCodeCoverage -coverageResultsPath {{ yamato_source_dir_win }}/upm-ci~/test-results/CodeCoverage/ -coverageOptions "generateAdditionalMetrics;generateHtmlReport;assemblyFilters:+Unity.InputSystem;sourcePaths:{{ yamato_source_dir_win }}/Packages/com.unity.inputsystem/" -quit' - # Delete the Package and Project reports, only keep the final merged one to keep Aritfacts.zip smaller + # Delete the Package and Project reports & raw coverage data, to keep Aritfacts.zip smaller - rmdir /s/q "{{ yamato_source_dir_win }}/upm-ci~/test-results/CodeCoverage/Package" - rmdir /s/q "{{ yamato_source_dir_win }}/upm-ci~/test-results/CodeCoverage/Project" {% endif %} @@ -92,16 +90,11 @@ - mv ./Packages/com.unity.inputsystem/Samples.meta ./Assets # Now run our full test suite that sits in Assets/Tests by running UTR on our project. - ./utr --testproject . --timeout=1200 --editor-location=.Editor --artifacts_path=upm-ci~/test-results/isolation-com.unity.inputsystem.tests --suite=playmode {% if platform.name == "mac" or platform.name == "linux"%} --suite=editor {% endif %} {% if category.name == "performance" %} --category=Performance {% else %} --category=!Performance {% endif %} --api-profile=NET_4_6 {% if platform.runtime %} --platform {{ platform.runtime }} {% endif %} {% if platform.scripting-backend %} --scripting-backend {{ platform.scripting-backend }} {% endif %} {% if category.name == "performance" %} --report-performance-data --performance-project-id=InputSystem {% endif %} {% if category.name == "functional" and platform.name == "mac" or platform.name == "linux" %} --enable-code-coverage --coverage-options="generateAdditionalMetrics;generateHtmlReport;assemblyFilters:+Unity.InputSystem" --coverage-results-path={{ yamato_source_dir_nix }}/upm-ci~/test-results/CodeCoverage/Project --coverage-upload-options="reportsDir:upm-ci~/test-results/CodeCoverage/Project;name:{{platform.name}}_{{editor.version}}_project;flags:{{platform.name}}_{{editor.version}}_project" {% endif %} - # Merge all the code coverage results into one report. - {% if platform.name == "mac" and category.name == "functional" %} - - '{{ yamato_source_dir_nix }}/.Editor/Unity.app/Contents/MacOS/Unity -projectPath {{ yamato_source_dir_nix }} -batchmode -debugCodeOptimization -enableCodeCoverage -coverageResultsPath {{ yamato_source_dir_nix }}/upm-ci~/test-results/CodeCoverage/ -coverageOptions "generateAdditionalMetrics;generateHtmlReport;assemblyFilters:+Unity.InputSystem;sourcePaths:{{ yamato_source_dir_nix }}/Packages/com.unity.inputsystem/" -quit' - {% endif %} - {% if platform.name == "linux" and category.name == "functional" %} - - '{{ yamato_source_dir_nix }}/.Editor/Unity -projectPath {{ yamato_source_dir_nix }} -batchmode -debugCodeOptimization -enableCodeCoverage -coverageResultsPath {{ yamato_source_dir_nix }}/upm-ci~/test-results/CodeCoverage/ -coverageOptions "generateAdditionalMetrics;generateHtmlReport;assemblyFilters:+Unity.InputSystem;sourcePaths:{{ yamato_source_dir_nix }}/Packages/com.unity.inputsystem/" -quit' - {% endif %} - # Delete the Package and Project reports, only keep the final merged one to keep Aritfacts.zip smaller + {% if category.name == "functional" and platform.name == "mac" or platform.name == "linux"%} + # Delete the Package and Project reports & raw coverage data, to keep Aritfacts.zip smaller - rm -rf {{ yamato_source_dir_nix }}/upm-ci~/test-results/CodeCoverage/Package - - rm -rf {{ yamato_source_dir_nix }}/upm-ci~/test-results/CodeCoverage/Project + - rm -rf {{ yamato_source_dir_nix }}/upm-ci~/test-results/CodeCoverage/Project + {% endif %} after: - {{ instabilities_install_nix }} - {{ platform.instabilities_run }} From f04ae1a7f8528d6e52b6d7bd4953d7b0e708cab1 Mon Sep 17 00:00:00 2001 From: Nikos Chagialas Date: Mon, 19 May 2025 10:47:07 +0100 Subject: [PATCH 5/6] Fixed typo --- .yamato/upm-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.yamato/upm-ci.yml b/.yamato/upm-ci.yml index 1b593a3ab9..e8fa6a584d 100644 --- a/.yamato/upm-ci.yml +++ b/.yamato/upm-ci.yml @@ -38,7 +38,7 @@ # Now run our full test suite that sits in Assets/Tests by running UTR on our project. - ./utr --testproject . --timeout=1200 --editor-location=.Editor --artifacts_path=upm-ci~/test-results/isolation-com.unity.inputsystem.tests --suite=playmode {% if platform.name == "win" %} --suite=editor {% endif %} {% if category.name == "performance" %} --category=Performance {% else %} --category=!Performance {% endif %} --api-profile=NET_4_6 {% if platform.runtime %} --platform {{ platform.runtime }} {% endif %} {% if platform.scripting-backend %} --scripting-backend {{ platform.scripting-backend }} {% endif %} {% if category.name == "performance" %} --report-performance-data --performance-project-id=InputSystem {% endif %} {% if platform.name == "win" and category.name == "functional" %}--enable-code-coverage --coverage-options="generateAdditionalMetrics;generateHtmlReport;assemblyFilters:+Unity.InputSystem" --coverage-results-path={{ yamato_source_dir_win }}/upm-ci~/test-results/CodeCoverage/Project --coverage-upload-options="reportsDir:upm-ci~/test-results/CodeCoverage/Project;name:{{platform.name}}_{{editor.version}}_project;flags:{{platform.name}}_{{editor.version}}_project" {% endif %} {% if platform.name == "win" and category.name == "functional" %} - # Delete the Package and Project reports & raw coverage data, to keep Aritfacts.zip smaller + # Delete the Package and Project reports & raw coverage data, to keep Artifacts.zip smaller - rmdir /s/q "{{ yamato_source_dir_win }}/upm-ci~/test-results/CodeCoverage/Package" - rmdir /s/q "{{ yamato_source_dir_win }}/upm-ci~/test-results/CodeCoverage/Project" {% endif %} @@ -91,7 +91,7 @@ # Now run our full test suite that sits in Assets/Tests by running UTR on our project. - ./utr --testproject . --timeout=1200 --editor-location=.Editor --artifacts_path=upm-ci~/test-results/isolation-com.unity.inputsystem.tests --suite=playmode {% if platform.name == "mac" or platform.name == "linux"%} --suite=editor {% endif %} {% if category.name == "performance" %} --category=Performance {% else %} --category=!Performance {% endif %} --api-profile=NET_4_6 {% if platform.runtime %} --platform {{ platform.runtime }} {% endif %} {% if platform.scripting-backend %} --scripting-backend {{ platform.scripting-backend }} {% endif %} {% if category.name == "performance" %} --report-performance-data --performance-project-id=InputSystem {% endif %} {% if category.name == "functional" and platform.name == "mac" or platform.name == "linux" %} --enable-code-coverage --coverage-options="generateAdditionalMetrics;generateHtmlReport;assemblyFilters:+Unity.InputSystem" --coverage-results-path={{ yamato_source_dir_nix }}/upm-ci~/test-results/CodeCoverage/Project --coverage-upload-options="reportsDir:upm-ci~/test-results/CodeCoverage/Project;name:{{platform.name}}_{{editor.version}}_project;flags:{{platform.name}}_{{editor.version}}_project" {% endif %} {% if category.name == "functional" and platform.name == "mac" or platform.name == "linux"%} - # Delete the Package and Project reports & raw coverage data, to keep Aritfacts.zip smaller + # Delete the Package and Project reports & raw coverage data, to keep Artifacts.zip smaller - rm -rf {{ yamato_source_dir_nix }}/upm-ci~/test-results/CodeCoverage/Package - rm -rf {{ yamato_source_dir_nix }}/upm-ci~/test-results/CodeCoverage/Project {% endif %} From 182b2989da3c5f544989ece58004885c9f0810fa Mon Sep 17 00:00:00 2001 From: Nikos Chagialas Date: Mon, 19 May 2025 10:56:41 +0100 Subject: [PATCH 6/6] Fixed trigger expression --- .yamato/upm-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.yamato/upm-ci.yml b/.yamato/upm-ci.yml index e8fa6a584d..4f82281452 100644 --- a/.yamato/upm-ci.yml +++ b/.yamato/upm-ci.yml @@ -51,7 +51,7 @@ - "upm-ci~/test-results/**/*" {% if platform.name == "win" and category.name == "functional" %} triggers: - expression: push.branch match "develop" + expression: push.branch eq "develop" cancel_old_ci: true {% endif %} {% endfor %} # test_category @@ -104,7 +104,7 @@ - "upm-ci~/test-results/**/*" {% if category.name == "functional" and platform.name == "mac" or platform.name == "linux"%} triggers: - expression: push.branch match "develop" + expression: push.branch eq "develop" cancel_old_ci: true {% endif %} {% endfor %} # test_category