diff --git a/.yamato/yamato-config.yml b/.yamato/yamato-config.yml index e10aae1..fd97b5d 100644 --- a/.yamato/yamato-config.yml +++ b/.yamato/yamato-config.yml @@ -9,14 +9,19 @@ commands: - python3 -m pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple --upgrade - unity-downloader-cli -u 2020.2.0b9 -c editor -c StandaloneSupport-IL2CPP -c Linux --wait --published - git clone git@github.cds.internal.unity3d.com:unity/utr.git utr - - utr/utr --testproject=./TestRosTcpConnector --editor-location=.Editor --reruncount=0 --artifacts_path=test-results --suite=playmode --suite=editor --platform=Editor + - utr/utr --testproject=./TestRosTcpConnector --editor-location=.Editor --reruncount=0 --artifacts_path=test-results --suite=playmode --suite=editor --platform=Editor --enable-code-coverage --coverage-results-path=../test-results --coverage-options="assemblyFilters:+Unity.Robotics.ROSTCPConnector,+Unity.Robotics.ROSTCPConnector.Editor;generateHtmlReport;generateBadgeReport;generateAdditionalMetrics" + # check test coverage + - command: | + linecoverage=$(cat test-results/Report/Summary.xml | grep Linecoverage | grep -Eo '[+-]?[0-9]+([.][0-9]+)?') + echo "Line coverage: $linecoverage%" + if (( $(echo "$linecoverage < 0" | bc -l) )); then exit 1; fi triggers: cancel_old_ci: true expression: | (pull_request.target eq "main" AND NOT pull_request.push.changes.all match "**/*.md") OR - (push.branch eq "dev" AND - NOT push.changes.all match "**/*.md") + (pull_request.target eq "dev" AND + NOT pull_request.push.changes.all match "**/*.md") artifacts: logs: paths: diff --git a/TestRosTcpConnector/Packages/manifest.json b/TestRosTcpConnector/Packages/manifest.json index 865f8ad..abb1543 100644 --- a/TestRosTcpConnector/Packages/manifest.json +++ b/TestRosTcpConnector/Packages/manifest.json @@ -6,7 +6,8 @@ "com.unity.ide.vscode": "1.2.2", "com.unity.render-pipelines.universal": "10.0.0-preview.26", "com.unity.robotics.ros-tcp-connector": "file:../../com.unity.robotics.ros-tcp-connector", - "com.unity.test-framework": "1.1.18", + "com.unity.test-framework": "1.1.20", + "com.unity.testtools.codecoverage": "1.0.0", "com.unity.textmeshpro": "3.0.1", "com.unity.timeline": "1.4.3", "com.unity.ugui": "1.0.0",