add test coverage (#102)
This commit is contained in:
Родитель
63730e6cb5
Коммит
80fe3a9b39
|
@ -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:
|
||||
|
|
|
@ -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",
|
||||
|
|
Загрузка…
Ссылка в новой задаче