aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author杨宇千 <crupest@outlook.com>2019-08-09 15:59:38 +0800
committer杨宇千 <crupest@outlook.com>2019-08-09 15:59:38 +0800
commit5c1695f2e552cc3f4e016a4b5e8d96b3e1da41a1 (patch)
treeab5e22078a91367b4b8d9dc9c6a90f3b265a789c
parent58986da4a5bfe519af44e5834edfbe8d4651b51c (diff)
downloadtimeline-5c1695f2e552cc3f4e016a4b5e8d96b3e1da41a1.tar.gz
timeline-5c1695f2e552cc3f4e016a4b5e8d96b3e1da41a1.tar.bz2
timeline-5c1695f2e552cc3f4e016a4b5e8d96b3e1da41a1.zip
Add configuration file to remove Database Migration Files from code coverage.
-rw-r--r--CI/build-pipeline.yml2
-rw-r--r--Timeline.Tests/coverletArgs.runsettings13
2 files changed, 14 insertions, 1 deletions
diff --git a/CI/build-pipeline.yml b/CI/build-pipeline.yml
index 2c15e301..85b373ff 100644
--- a/CI/build-pipeline.yml
+++ b/CI/build-pipeline.yml
@@ -19,7 +19,7 @@ steps:
dotnet restore Timeline.Tests/Timeline.Tests.csproj --configfile nuget.config
displayName: Dotnet Restore
-- script: dotnet test Timeline.Tests/Timeline.Tests.csproj --configuration $(buildConfiguration) --no-restore --logger trx --collect:"XPlat Code Coverage"
+- script: dotnet test Timeline.Tests/Timeline.Tests.csproj --configuration $(buildConfiguration) --no-restore --logger trx --collect:"XPlat Code Coverage" --settings './coverletArgs.runsettings'
displayName: Dotnet Test
- task: PublishTestResults@2
diff --git a/Timeline.Tests/coverletArgs.runsettings b/Timeline.Tests/coverletArgs.runsettings
new file mode 100644
index 00000000..a2284297
--- /dev/null
+++ b/Timeline.Tests/coverletArgs.runsettings
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<RunSettings>
+ <DataCollectionRunSettings>
+ <DataCollectors>
+ <DataCollector friendlyName="XPlat code coverage">
+ <Configuration>
+ <!-- [Assembly-Filter]Type-Filter -->
+ <Exclude>[Timeline]Timeline.Migrations.*</Exclude>
+ </Configuration>
+ </DataCollector>
+ </DataCollectors>
+ </DataCollectionRunSettings>
+</RunSettings>