Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace Newtonsoft.Json package with System.Text.Json #1513

Merged
merged 19 commits into from
Sep 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"version": 1,
"isRoot": true,
"tools": {
"dotnet-reportgenerator-globaltool": {
"version": "5.1.24",
"commands": [
"reportgenerator"
]
}
}
}
1 change: 1 addition & 0 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
We can check minimum supported package version here /~https://github.com/Microsoft/vstest/blob/master/src/Microsoft.TestPlatform.ObjectModel/Microsoft.TestPlatform.ObjectModel.csproj#L34
-->
<PackageVersion Include="System.Reflection.Metadata" Version="1.6.0" />
<PackageVersion Include="System.Text.Json" Version="7.0.3" />
<!-- Coverlet.Core.Tests executed in Visual Studio will fail with Tmds.ExecFunction version > 0.4.0 => use "dotnet test"
System.TypeInitializationException : The type initializer for 'Tmds.Utils.ExecFunction' threw an exception.
System.NotSupportedException : Application is running as testhost, unable to determine parent 'dotnet' process.
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Coverlet

[![Build Status](https://dev.azure.com/tonerdo/coverlet/_apis/build/status/coverlet-coverage.coverlet?branchName=master)](https://dev.azure.com/tonerdo/coverlet/_build/latest?definitionId=5&branchName=master) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](/~https://github.com/coverlet-coverage/coverlet/blob/master/LICENSE)
[![Build Status](https://dev.azure.com/tonerdo/coverlet/_apis/build/status/coverlet-coverage.coverlet?branchName=master)](https://dev.azure.com/tonerdo/coverlet/_build/latest?definitionId=5&branchName=master) ![Code%20Coverage](https://img.shields.io/azure-devops/coverage/tonerdo/coverlet/5/master?label=Code%20Coverage) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](/~https://github.com/coverlet-coverage/coverlet/blob/master/LICENSE)

| Driver | Current version | Downloads |
|---|---|---|
Expand Down Expand Up @@ -170,8 +170,8 @@ Author and owner

Co-maintainers

* [David Müller](/~https://github.com/daveMueller)
* [Bert](/~https://github.com/Bertk)
* [David Müller](/~https://github.com/daveMueller)
* [Bert](/~https://github.com/Bertk)
* [Peter Liljenberg](/~https://github.com/petli)
* [Marco Rossignoli](/~https://github.com/MarcoRossignoli)

Expand Down
2 changes: 1 addition & 1 deletion eng/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ trigger:
branches:
include: ["master", "*_validate"]
paths:
exclude: [".github", "doc", "*.md"]
exclude: [".github", "Documentation", "*.md"]

jobs:
- job: Windows
Expand Down
11 changes: 6 additions & 5 deletions eng/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ steps:

- template: publish-coverlet-result-files.yml

#- template: publish-coverage-results.yml
# parameters:
# reports: $(Build.SourcesDirectory)/**/coverage.opencover.xml
# condition: and(succeeded(), eq(variables['_BuildConfig'], 'Debug'))
# assemblyfilters: '-xunit*;+Coverlet.Core.*;+Coverlet.Collector.*'
- template: publish-coverage-results.yml
parameters:
reports: $(Build.SourcesDirectory)/**/coverage.opencover.xml
condition: and(succeeded(), eq(variables['BuildConfiguration'], 'Debug'))
assemblyfilters: '-xunit'

23 changes: 17 additions & 6 deletions eng/publish-coverage-results.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,29 @@ parameters:
condition: 'succeeded()'
reports: ''
assemblyfilters: '-xunit*'
classfilters: ''
breakBuild: false

steps:
- task: reportgenerator@5
- task: Powershell@2
displayName: ReportGenerator
condition: ${{parameters.condition}}
inputs:
reports: ${{parameters.reports}}
targetdir: $(Build.SourcesDirectory)/artifacts/CoverageReport
reporttypes: Html;HtmlInline_AzurePipelines_Dark;Cobertura
verbosity: 'Verbose'
assemblyfilters: ${{parameters.assemblyfilters}}
targetType: inline
pwsh: true
script: |
dotnet tool restore
dotnet reportgenerator -reports:"${{parameters.reports}}" -targetdir:"$(Build.SourcesDirectory)/artifacts/CoverageReport" -reporttypes:"Html;HtmlInline_AzurePipelines_Dark;Cobertura" -assemblyfilters:"${{parameters.assemblyfilters}}" -classfilters:"${{parameters.classfilters}}" -verbosity:Verbose

# - task: reportgenerator@5
# displayName: ReportGenerator
# condition: ${{parameters.condition}}
# inputs:
# reports: ${{parameters.reports}}
# targetdir: $(Build.SourcesDirectory)/artifacts/CoverageReport
# reporttypes: Html;HtmlInline_AzurePipelines_Dark;Cobertura
# verbosity: 'Verbose'
# assemblyfilters: ${{parameters.assemblyfilters}}

- publish: '$(Build.SourcesDirectory)/artifacts/CoverageReport'
displayName: 'Publish CoverageReport Artifact'
Expand Down
11 changes: 9 additions & 2 deletions eng/publish-coverlet-result-files.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
steps:
- task: Powershell@2
displayName: Prepare coverage files to Upload
displayName: Prepare log files to Upload
inputs:
targetType: inline
pwsh: true
Expand All @@ -26,8 +26,15 @@ steps:
continueOnError: true
condition: always()

- task: CopyFiles@2
displayName: Copy trx files
inputs:
SourceFolder: '$(Agent.TempDirectory)'
Contents: '**/*.trx'
TargetFolder: '$(Build.SourcesDirectory)/artifacts/TestLogs'

- task: PublishPipelineArtifact@1
displayName: Publish coverage logs
displayName: Publish Coverlet logs
continueOnError: true
condition: always()
inputs:
Expand Down
1 change: 1 addition & 0 deletions src/coverlet.collector/coverlet.collector.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.TestPlatform.ObjectModel" />
<PackageReference Include="NuGet.Frameworks" />
</ItemGroup>

<ItemGroup>
Expand Down
Loading