File tree Expand file tree Collapse file tree 1 file changed +13
-4
lines changed
Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -117,20 +117,29 @@ jobs:
117117 run : git checkout ${{ github.head_ref }}
118118
119119 # Run playmode tests
120- - name : " Build editor tests"
120+ - name : " Run playmode tests"
121121 if : always() && steps.activation.conclusion == 'success'
122122 run : |
123123 xvfb-run --auto-servernum --server-args='-screen 0 640x480x24' \
124124 /opt/Unity/Editor/Unity -batchmode -nographics -silent-crashes -logFile -projectPath . -runTests -testPlatform playmode || exit 0
125125
126126 # Run editmode tests
127- - name : " Build editor tests"
127+ - name : " Run editmode tests"
128128 if : always() && steps.activation.conclusion == 'success'
129129 run : |
130+ # Install codecoverage
131+ if [ -z "`echo ${{ matrix.unity }} | grep 2018.`" ]; then
132+ npm i -g openupm-cli
133+ openupm add com.unity.testtools.codecoverage
134+
135+ xvfb-run --auto-servernum --server-args='-screen 0 640x480x24' \
136+ /opt/Unity/Editor/Unity -batchmode -nographics -silent-crashes -logFile -projectPath . -executeMethod Coffee.CSharpCompilerSettings.Menus.SetDevelopMode
137+ fi
138+
130139 xvfb-run --auto-servernum --server-args='-screen 0 640x480x24' \
131- /opt/Unity/Editor/Unity -batchmode -nographics -silent-crashes -logFile -projectPath . -runTests -testPlatform editmode || exit 0
140+ /opt/Unity/Editor/Unity -batchmode -nographics -silent-crashes -logFile -projectPath . -runEditorTests -enableCodeCoverage -coverageOptions 'assemblyFilters:+CSharpCompilerSettings' || exit 0
132141
133142 # Push test results
134143 - name : Push test results
135144 if : always() && steps.activation.conclusion == 'success'
136- run : testspace "[${{ matrix.unity }}]TestResults-*.xml"
145+ run : testspace "[${{ matrix.unity }}]TestResults-*.xml" "[Code Coverage]CodeCoverage/**/TestCoverageResults_*.xml"
You can’t perform that action at this time.
0 commit comments