diff options
author | 杨宇千 <crupest@outlook.com> | 2019-08-09 15:59:38 +0800 |
---|---|---|
committer | 杨宇千 <crupest@outlook.com> | 2019-08-09 15:59:38 +0800 |
commit | ca91baed973a12efeb8e139c521e62fe3f0a3680 (patch) | |
tree | ab5e22078a91367b4b8d9dc9c6a90f3b265a789c | |
parent | 5e0ad225efd9627fa99509a1fdf3ed07672c8bda (diff) | |
download | timeline-ca91baed973a12efeb8e139c521e62fe3f0a3680.tar.gz timeline-ca91baed973a12efeb8e139c521e62fe3f0a3680.tar.bz2 timeline-ca91baed973a12efeb8e139c521e62fe3f0a3680.zip |
Add configuration file to remove Database Migration Files from code coverage.
-rw-r--r-- | CI/build-pipeline.yml | 2 | ||||
-rw-r--r-- | Timeline.Tests/coverletArgs.runsettings | 13 |
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>
|