Skip to content

Commit 71811d2

Browse files
committed
build: generate code coverage
1 parent 4fc71a0 commit 71811d2

3 files changed

Lines changed: 49 additions & 1 deletion

File tree

Directory.Build.props

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,16 @@
1010
<PackageProjectUrl>https://github.com/visualon/cssparser</PackageProjectUrl>
1111
<PackageLicenseExpression>MIT</PackageLicenseExpression>
1212

13-
<MinClientVersion>2.12</MinClientVersion>
1413
<PublishRepositoryUrl>true</PublishRepositoryUrl>
1514
<!-- including PDB files in NuGet for source link because symbolsource.org does not support portable PDBs -->
1615
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
16+
17+
<FineCodeCoverage>
18+
<Enabled>true</Enabled>
19+
<RunMsCodeCoverage>true</RunMsCodeCoverage>
20+
<!-- and more -->
21+
</FineCodeCoverage>
22+
<RunSettingsFilePath>$(MSBuildThisFileDirectory)/Test.runsettings</RunSettingsFilePath>
1723
</PropertyGroup>
1824

1925
<PropertyGroup>

Test.runsettings

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<RunSettings>
3+
<!-- Configurations that affect the Test Framework -->
4+
<MSTest>
5+
<DeleteDeploymentDirectoryAfterTestRunIsComplete>false</DeleteDeploymentDirectoryAfterTestRunIsComplete>
6+
</MSTest>
7+
8+
9+
<DataCollectionRunSettings>
10+
<DataCollectors>
11+
<DataCollector friendlyName="Code Coverage" uri="datacollector://Microsoft/CodeCoverage/2.0">
12+
<Configuration>
13+
<Format>Cobertura</Format>
14+
<CodeCoverage>
15+
<ModulePaths>
16+
<Include>
17+
<ModulePath>NCrontab\.Advanced\.dll$</ModulePath>
18+
</Include>
19+
</ModulePaths>
20+
<Attributes>
21+
<Exclude>
22+
<!-- Don't forget "Attribute" at the end of the name -->
23+
<!--<Attribute>^System\.Diagnostics\.DebuggerHiddenAttribute$</Attribute>
24+
<Attribute>^System\.Diagnostics\.DebuggerNonUserCodeAttribute$</Attribute>-->
25+
<Attribute>^System\.CodeDom\.Compiler\.GeneratedCodeAttribute$</Attribute>
26+
<Attribute>^System\.Diagnostics\.CodeAnalysis\.ExcludeFromCodeCoverageAttribute$</Attribute>
27+
</Exclude>
28+
</Attributes>
29+
</CodeCoverage>
30+
</Configuration>
31+
</DataCollector>
32+
</DataCollectors>
33+
</DataCollectionRunSettings>
34+
35+
36+
</RunSettings>

codecov.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
comment: false
2+
codecov:
3+
require_ci_to_pass: false
4+
notify:
5+
after_n_builds: 3
6+
wait_for_ci: true

0 commit comments

Comments
 (0)