From bb5b57ceb1254789c8e159a4d6658b99fc56cc05 Mon Sep 17 00:00:00 2001 From: michalChrobot Date: Mon, 2 Jun 2025 18:40:08 +0200 Subject: [PATCH 1/6] Added codecov file --- .github/codecov.yml | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/codecov.yml diff --git a/.github/codecov.yml b/.github/codecov.yml new file mode 100644 index 0000000000..de025f28a1 --- /dev/null +++ b/.github/codecov.yml @@ -0,0 +1,39 @@ +codecov: + require_ci_to_pass: false + notify: + wait_for_ci: true + +coverage: + precision: 2 + round: down + range: "50...70" + status: + patch: + default: + if_ci_failed: success + informational: true + default_rules: + flag_coverage_not_uploaded_behavior: exclude + project: + default: + target: auto + # Threshold used for the PR Check + threshold: 0.5% + base: auto + if_ci_failed: success + informational: true + only_pulls: true + +# PR Comment configuration +comment: + layout: "diff, flags, files, components" + behavior: default + require_changes: false + require_base: false + require_head: false + # Set this to the number of coverage jobs run in the PR + after_n_builds: 1 + +flag_management: + default_rules: + carryforward: true From 4e6302cb1b68b205a1c051fc025feef942cced72 Mon Sep 17 00:00:00 2001 From: michalChrobot Date: Mon, 2 Jun 2025 18:55:43 +0200 Subject: [PATCH 2/6] Updated code-coverage job --- .yamato/code-coverage.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.yamato/code-coverage.yml b/.yamato/code-coverage.yml index fcc64a4ccf..23139a1d30 100644 --- a/.yamato/code-coverage.yml +++ b/.yamato/code-coverage.yml @@ -21,7 +21,6 @@ # In order to properly use -coverage-results-path parameter we need to start it with $PWD (which means the absolute path). Otherwise, coverage results will not be visible # QUALITY CONSIDERATIONS-------------------------------------------------------------------- - # TODO: somewhere in 2025 we will be able to upload resuls to CodeCov from public repos # To see where this job is included (in trigger job definitions) look into _triggers.yml file @@ -39,7 +38,7 @@ code_coverage_{{ platform.name }}_{{ editor }}: commands: - unity-downloader-cli --fast --wait -u {{ editor }} -c Editor {% if platform.name == "mac" %} --arch arm64 {% endif %} # For macOS we use ARM64 models - upm-pvp create-test-project test-project --packages "upm-ci~/packages/*.tgz" --unity .Editor - - UnifiedTestRunner --suite=editor --suite=playmode --editor-location=.Editor --testproject=test-project --enable-code-coverage -coverage-results-path=$PWD/test-results/CodeCoverage --coverage-options="generateHtmlReport;generateAdditionalMetrics;assemblyFilters:+Unity.Netcode.Editor,+Unity.Netcode.Runtime" --extra-editor-arg=--burst-disable-compilation --timeout=1800 --reruncount=1 --clean-library-on-rerun --artifacts-path=test-results + - UnifiedTestRunner --suite=editor --suite=playmode --editor-location=.Editor --testproject=test-project --enable-code-coverage --coverage-upload-options=\"reportsDir:$PWD/test-results/CodeCoverage;name:NetcodeForGameobjects_ubuntu_trunk;flags:NetcodeForGameobjects_ubuntu_trunk\" --coverage-results-path=$PWD/test-results/CodeCoverage --coverage-options="generateHtmlReport;generateAdditionalMetrics;assemblyFilters:+Unity.Netcode.Editor,+Unity.Netcode.Runtime" --extra-editor-arg=--burst-disable-compilation --timeout=1800 --reruncount=1 --clean-library-on-rerun --artifacts-path=test-results artifacts: logs: paths: From 8e859abb39027bda2464d3e2f51f197a70fd554c Mon Sep 17 00:00:00 2001 From: michalChrobot Date: Fri, 13 Jun 2025 13:26:52 +0200 Subject: [PATCH 3/6] Added component configuration as per docs --- .github/codecov.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/codecov.yml b/.github/codecov.yml index de025f28a1..d919d6f2f9 100644 --- a/.github/codecov.yml +++ b/.github/codecov.yml @@ -37,3 +37,11 @@ comment: flag_management: default_rules: carryforward: true + +# Components configuration +component_management: + individual_components: + - component_id: "com.unity.netcode.gameobjects" + name: "Netcode for GameObjects" + paths: + - com.unity.netcode.gameobjects \ No newline at end of file From c9bbac5facf0b32679d4c84f95ee016c7f85ff32 Mon Sep 17 00:00:00 2001 From: michalChrobot Date: Fri, 13 Jun 2025 13:29:29 +0200 Subject: [PATCH 4/6] Corrected coverage upload command --- .yamato/code-coverage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.yamato/code-coverage.yml b/.yamato/code-coverage.yml index 23139a1d30..8b78b57278 100644 --- a/.yamato/code-coverage.yml +++ b/.yamato/code-coverage.yml @@ -38,7 +38,7 @@ code_coverage_{{ platform.name }}_{{ editor }}: commands: - unity-downloader-cli --fast --wait -u {{ editor }} -c Editor {% if platform.name == "mac" %} --arch arm64 {% endif %} # For macOS we use ARM64 models - upm-pvp create-test-project test-project --packages "upm-ci~/packages/*.tgz" --unity .Editor - - UnifiedTestRunner --suite=editor --suite=playmode --editor-location=.Editor --testproject=test-project --enable-code-coverage --coverage-upload-options=\"reportsDir:$PWD/test-results/CodeCoverage;name:NetcodeForGameobjects_ubuntu_trunk;flags:NetcodeForGameobjects_ubuntu_trunk\" --coverage-results-path=$PWD/test-results/CodeCoverage --coverage-options="generateHtmlReport;generateAdditionalMetrics;assemblyFilters:+Unity.Netcode.Editor,+Unity.Netcode.Runtime" --extra-editor-arg=--burst-disable-compilation --timeout=1800 --reruncount=1 --clean-library-on-rerun --artifacts-path=test-results + - UnifiedTestRunner --suite=editor --suite=playmode --editor-location=.Editor --testproject=test-project --enable-code-coverage coverage-upload-options="reportsDir:$PWD/test-results/CoverageResults;name:NGO_{{ platform.name }}_{{ editor }};flags:NGO_{{ platform.name }}_{{ editor }};verbose" --coverage-results-path=$PWD/test-results/CoverageResults --coverage-options="generateHtmlReport;generateAdditionalMetrics;assemblyFilters:+Unity.Netcode.Editor,+Unity.Netcode.Runtime" --extra-editor-arg=--burst-disable-compilation --timeout=1800 --reruncount=1 --clean-library-on-rerun --artifacts-path=test-results artifacts: logs: paths: From ac66086a8f871abccbadf19e781d6709b5bba245 Mon Sep 17 00:00:00 2001 From: michalChrobot Date: Fri, 13 Jun 2025 13:32:45 +0200 Subject: [PATCH 5/6] Corrected name to underline that we are talking about 1.X version --- .yamato/code-coverage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.yamato/code-coverage.yml b/.yamato/code-coverage.yml index 8b78b57278..0c6cae0975 100644 --- a/.yamato/code-coverage.yml +++ b/.yamato/code-coverage.yml @@ -38,7 +38,7 @@ code_coverage_{{ platform.name }}_{{ editor }}: commands: - unity-downloader-cli --fast --wait -u {{ editor }} -c Editor {% if platform.name == "mac" %} --arch arm64 {% endif %} # For macOS we use ARM64 models - upm-pvp create-test-project test-project --packages "upm-ci~/packages/*.tgz" --unity .Editor - - UnifiedTestRunner --suite=editor --suite=playmode --editor-location=.Editor --testproject=test-project --enable-code-coverage coverage-upload-options="reportsDir:$PWD/test-results/CoverageResults;name:NGO_{{ platform.name }}_{{ editor }};flags:NGO_{{ platform.name }}_{{ editor }};verbose" --coverage-results-path=$PWD/test-results/CoverageResults --coverage-options="generateHtmlReport;generateAdditionalMetrics;assemblyFilters:+Unity.Netcode.Editor,+Unity.Netcode.Runtime" --extra-editor-arg=--burst-disable-compilation --timeout=1800 --reruncount=1 --clean-library-on-rerun --artifacts-path=test-results + - UnifiedTestRunner --suite=editor --suite=playmode --editor-location=.Editor --testproject=test-project --enable-code-coverage coverage-upload-options="reportsDir:$PWD/test-results/CoverageResults;name:NGOv1_{{ platform.name }}_{{ editor }};flags:NGOv1_{{ platform.name }}_{{ editor }};verbose" --coverage-results-path=$PWD/test-results/CoverageResults --coverage-options="generateHtmlReport;generateAdditionalMetrics;assemblyFilters:+Unity.Netcode.Editor,+Unity.Netcode.Runtime" --extra-editor-arg=--burst-disable-compilation --timeout=1800 --reruncount=1 --clean-library-on-rerun --artifacts-path=test-results artifacts: logs: paths: From 0632513c4291caa0781e12c89db92746ca2bb418 Mon Sep 17 00:00:00 2001 From: michalChrobot Date: Fri, 13 Jun 2025 13:37:20 +0200 Subject: [PATCH 6/6] Updated component name --- .github/codecov.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/codecov.yml b/.github/codecov.yml index d919d6f2f9..a5fa7c59af 100644 --- a/.github/codecov.yml +++ b/.github/codecov.yml @@ -42,6 +42,6 @@ flag_management: component_management: individual_components: - component_id: "com.unity.netcode.gameobjects" - name: "Netcode for GameObjects" + name: "com.unity.netcode.gameobjects" paths: - com.unity.netcode.gameobjects \ No newline at end of file