File tree Expand file tree Collapse file tree
.github/actions/testing/test
tests/PolylineAlgorithm.Tests Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -66,17 +66,23 @@ runs:
6666 name : ' Set CODE_COVERAGE_ARGS environment variable'
6767 shell : bash
6868 run : |
69- echo "CODE_COVERAGE_ARGS=--collect:"XPlat Code Coverage" --property:CoverletOutputFormat=${{ inputs.code-coverage-output-format}} " >> $GITHUB_ENV
69+ echo "CODE_COVERAGE_ARGS=--collect:"XPlat Code Coverage"" >> $GITHUB_ENV
7070
7171 - if : ${{ inputs.collect-code-coverage == 'true' && inputs.code-coverage-settings-file != ''}}
7272 name : ' Set CODE_COVERAGE_ARGS environment variable'
7373 shell : bash
7474 run : |
7575 echo "CODE_COVERAGE_ARGS=${{ env.CODE_COVERAGE_ARGS }} --settings ${{ inputs.code-coverage-settings-file }}" >> $GITHUB_ENV
76-
76+
77+ - if : ${{ inputs.collect-code-coverage == 'true'}}
78+ name : ' Set CODE_COVERAGE_ARGS environment variable'
79+ shell : bash
80+ run : |
81+ echo "CODE_COVERAGE_ARGS=${{ env.CODE_COVERAGE_ARGS }} -- /p:CoverletOutputFormat=${{ inputs.code-coverage-output-format}}" >> $GITHUB_ENV
82+
7783 - name : ' Test with .NET CLI'
7884 shell : bash
79- run : dotnet test ${{ inputs.project-path }} --configuration ${{ inputs.build-configuration }} ${{ env.CODE_COVERAGE_ARGS }} ${{ env. TRX_LOGGER_ARGS }} --results-directory ${{ inputs.test-results-directory }}
85+ run : dotnet test ${{ inputs.project-path }} --configuration ${{ inputs.build-configuration }} ${{ env.TRX_LOGGER_ARGS }} --results-directory ${{ inputs.test-results-directory }} ${{ env.CODE_COVERAGE_ARGS }}
8086
8187 - name : ' Upload test results'
8288 if : ${{ inputs.upload-test-artifacts == 'true' }}
Original file line number Diff line number Diff line change 2727
2828 <ItemGroup >
2929 <PackageReference Include =" Microsoft.NET.Test.Sdk" Version =" 18.3.0" />
30+ <PackageReference Include =" Microsoft.Testing.Extensions.CodeCoverage" Version =" 18.5.2" />
31+ <PackageReference Include =" Microsoft.Testing.Extensions.TrxReport" Version =" 2.1.0" />
3032 <PackageReference Include =" MSTest" Version =" 4.1.0" />
3133 <PackageReference Include =" Microsoft.Extensions.Diagnostics.Testing" Version =" 10.4.0" />
3234 <PackageReference Include =" Microsoft.Extensions.Logging.Abstractions" Version =" 10.0.5" />
You can’t perform that action at this time.
0 commit comments