diff --git a/.github/codecov.yml b/.github/codecov.yml new file mode 100644 index 0000000000..a5fa7c59af --- /dev/null +++ b/.github/codecov.yml @@ -0,0 +1,47 @@ +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 + +# Components configuration +component_management: + individual_components: + - component_id: "com.unity.netcode.gameobjects" + name: "com.unity.netcode.gameobjects" + paths: + - com.unity.netcode.gameobjects \ No newline at end of file diff --git a/.yamato/code-coverage.yml b/.yamato/code-coverage.yml index fcc64a4ccf..0c6cae0975 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/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: