Skip to content

Commit 5fc5f44

Browse files
committed
Use Coverlet instead
1 parent dc31fe9 commit 5fc5f44

File tree

2 files changed

+8
-32
lines changed

2 files changed

+8
-32
lines changed

.github/workflows/ci-pipeline.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
- name: Build
3232
run: dotnet build ${{ env.solutionPath }} --configuration Release --no-restore
3333
- name: Execute unit tests
34-
run: dotnet test ${{ env.solutionPath }} --configuration Release --settings ${{ env.solutionFolder }}/Console.Tests/CodeCoverage.runsettings --no-build --logger trx --no-restore --results-directory "TestResults" --collect:"Code Coverage;Format=Cobertura"
34+
run: dotnet test ${{ env.solutionPath }} --configuration Release --settings ${{ env.solutionFolder }}/Console.Tests/CodeCoverage.runsettings --no-build --logger trx --no-restore --results-directory "TestResults" --collect:"XPlat code coverage"
3535
- name: Publish Test Report
3636
uses: phoenix-actions/test-reporting@v8
3737
id: test-report # Set ID reference for step
@@ -44,7 +44,7 @@ jobs:
4444
uses: irongut/[email protected]
4545
if: github.event_name == 'pull_request'
4646
with:
47-
filename: TestResults/*/*.cobertura.xml
47+
filename: TestResults/*/coverage.cobertura.xml
4848
badge: true
4949
fail_below_min: true
5050
format: markdown
@@ -64,7 +64,7 @@ jobs:
6464
uses: danielpalme/[email protected]
6565
if: github.event_name == 'pull_request'
6666
with:
67-
reports: TestResults/*/*.xml # REQUIRED # The coverage reports that should be parsed (separated by semicolon). Globbing is supported.
67+
reports: TestResults/*/coverage.cobertura.xml # REQUIRED # The coverage reports that should be parsed (separated by semicolon). Globbing is supported.
6868
targetdir: 'coveragereport' # REQUIRED # The directory where the generated report should be saved.
6969
reporttypes: 'HtmlInline;Cobertura' # The output formats and scope (separated by semicolon) Values: Badges, Clover, Cobertura, OpenCover, CsvSummary, Html, Html_Dark, Html_Light, Html_BlueRed, HtmlChart, HtmlInline, HtmlInline_AzurePipelines, HtmlInline_AzurePipelines_Dark, HtmlInline_AzurePipelines_Light, HtmlSummary, Html_BlueRed_Summary, JsonSummary, Latex, LatexSummary, lcov, MarkdownSummary, MarkdownSummaryGithub, MarkdownDeltaSummary, MHtml, SvgChart, SonarQube, TeamCitySummary, TextSummary, TextDeltaSummary, Xml, XmlSummary
7070
tag: '${{ github.run_number }}_${{ github.run_id }}' # Optional tag or build version.

src/Dataverse.ConfigurationMigrationTool/Console.Tests/CodeCoverage.runsettings

Lines changed: 5 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -2,36 +2,12 @@
22
<RunSettings>
33
<DataCollectionRunSettings>
44
<DataCollectors>
5-
<DataCollector friendlyName="Code Coverage">
5+
<DataCollector friendlyName="XPlat code coverage">
66
<Configuration>
7-
<CodeCoverage>
8-
<ModulePaths>
9-
<Include>
10-
<ModulePath>Dataverse.ConfigurationMigrationTool.Console.dll$</ModulePath>
11-
<!-- Add more ModulePath nodes here. -->
12-
</Include>
13-
14-
</ModulePaths>
15-
<Functions>
16-
<Exclude>
17-
<Function>^Dataverse\.ConfigurationMigrationTool\.Console\.Services\.Dataverse\..*</Function>
18-
</Exclude>
19-
</Functions>
20-
<Sources>
21-
<Exclude>
22-
<Source>.*\\Program\\.*</Source>
23-
</Exclude>
24-
</Sources>
25-
<Attributes>
26-
<Exclude>
27-
<!-- Don't forget "Attribute" at the end of the name -->
28-
<Attribute>^System\.Diagnostics\.DebuggerHiddenAttribute$</Attribute>
29-
<Attribute>^System\.Diagnostics\.DebuggerNonUserCodeAttribute$</Attribute>
30-
<Attribute>^System\.CodeDom\.Compiler\.GeneratedCodeAttribute$</Attribute>
31-
<Attribute>^System\.Diagnostics\.CodeAnalysis\.ExcludeFromCodeCoverageAttribute$</Attribute>
32-
</Exclude>
33-
</Attributes>
34-
</CodeCoverage>
7+
<Format>cobertura</Format>
8+
<Exclude>[*]Dataverse.ConfigurationMigrationTool.Console.Services.Dataverse*</Exclude>
9+
<ExcludeByFile>**/Program.cs,</ExcludeByFile>
10+
<SkipAutoProps>true</SkipAutoProps>
3511
</Configuration>
3612
</DataCollector>
3713
</DataCollectors>

0 commit comments

Comments
 (0)