diff --git a/XmlSchemaClassGenerator.Tests/XmlSchemaClassGenerator.Tests.csproj b/XmlSchemaClassGenerator.Tests/XmlSchemaClassGenerator.Tests.csproj index 29d62f20..a634f396 100644 --- a/XmlSchemaClassGenerator.Tests/XmlSchemaClassGenerator.Tests.csproj +++ b/XmlSchemaClassGenerator.Tests/XmlSchemaClassGenerator.Tests.csproj @@ -13,6 +13,8 @@ false false latest + opencover + ../coverage.xml diff --git a/appveyor.yml b/appveyor.yml index 98143764..53f454e8 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -23,16 +23,17 @@ test_script: - ps: | if (-not $env:APPVEYOR_PULL_REQUEST_NUMBER) { dotnet tool install --global dotnet-sonarscanner - dotnet sonarscanner begin /k:"mganss_XmlSchemaClassGenerator" /v:$env:APPVEYOR_BUILD_VERSION /o:"mganss-github" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.login="$env:sonar_token" /d:sonar.cs.opencover.reportsPaths="$($env:APPVEYOR_BUILD_FOLDER)\coverage.net6.0.xml" /d:sonar.coverage.exclusions="**/Program.cs" + dotnet sonarscanner begin /k:"mganss_XmlSchemaClassGenerator" /v:$env:APPVEYOR_BUILD_VERSION /o:"mganss-github" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.login="$env:sonar_token" /d:sonar.cs.opencover.reportsPaths="$($env:APPVEYOR_BUILD_FOLDER)\coverage.xml" /d:sonar.coverage.exclusions="**/Program.cs" dotnet build } - - dotnet test /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:CoverletOutput="..\coverage.json" XmlSchemaClassGenerator.Tests\XmlSchemaClassGenerator.Tests.csproj /p:Include="[XmlSchemaClassGenerator]*" -f net6.0 + - dotnet test /p:CollectCoverage=true XmlSchemaClassGenerator.Tests\XmlSchemaClassGenerator.Tests.csproj /p:Include="[XmlSchemaClassGenerator]*" -f net6.0 + - ps: cp coverage.*.xml ./coverage.xml - ps: | if (-not $env:APPVEYOR_PULL_REQUEST_NUMBER) { dotnet sonarscanner end /d:sonar.login="$env:sonar_token" } - pip install codecov - - codecov -f "coverage.net6.0.json" + - codecov -f "coverage.xml" artifacts: - path: 'XmlSchemaClassGenerator\**\*.*nupkg' - path: 'XmlSchemaClassGenerator.Console\**\*.*nupkg'