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: diff --git a/.yamato/upm-ci.yml b/.yamato/upm-ci.yml index b705d9b170..4f82281452 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 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 %} @@ -51,6 +49,11 @@ UTR_Output.zip: paths: - "upm-ci~/test-results/**/*" +{% if platform.name == "win" and category.name == "functional" %} + triggers: + expression: push.branch eq "develop" + cancel_old_ci: true +{% endif %} {% endfor %} # test_category {% endfor %} # platforms_win @@ -76,7 +79,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,17 +89,12 @@ - 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 %} - # 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 + - ./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 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 + - rm -rf {{ yamato_source_dir_nix }}/upm-ci~/test-results/CodeCoverage/Project + {% endif %} after: - {{ instabilities_install_nix }} - {{ platform.instabilities_run }} @@ -104,6 +102,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 eq "develop" + cancel_old_ci: true +{% endif %} {% endfor %} # test_category {% endfor %} # platforms_nix {% endfor %} # editors