Skip to content

Commit a6cd102

Browse files
committed
i have enough now
1 parent 8a11c16 commit a6cd102

2 files changed

Lines changed: 11 additions & 3 deletions

File tree

.github/actions/testing/test/action.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff 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' }}

tests/PolylineAlgorithm.Tests/PolylineAlgorithm.Tests.csproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
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" />

0 commit comments

Comments
 (0)