Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ coverage:
threshold: 1%
base: auto
if_ci_failed: success
informational: false
informational: true
only_pulls: true

comment:
Expand Down
31 changes: 17 additions & 14 deletions .yamato/upm-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}
Expand All @@ -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

Expand All @@ -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
Expand All @@ -86,24 +89,24 @@
- 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 }}
artifacts:
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
Expand Down