Skip to content

Commit

Permalink
Attempt to replace OpenCover with coverlet, see rubberduck-vba#5950
Browse files Browse the repository at this point in the history
  • Loading branch information
Vogel612 committed May 7, 2022
1 parent b88c22f commit 97c0f73
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
3 changes: 3 additions & 0 deletions RubberduckTests/RubberduckTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@
<PackageReference Include="System.Threading.Tasks.Extensions">
<Version>4.4.0</Version>
</PackageReference>
<PackageReference Include="coverlet.msbuild">
<Version>3.1.2</Version>
</PackageReference>
</ItemGroup>
<Choose>
<When Condition="'$(VisualStudioVersion)' == '10.0' And '$(IsCodedUITest)' == 'True'">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,9 @@
<PackageReference Include="System.Xml.XPath.XDocument">
<Version>4.3.0</Version>
</PackageReference>
<PackageReference Include="coverlet.msbuild">
<Version>3.1.2</Version>
</PackageReference>
</ItemGroup>
<ItemGroup>
<Compile Update="RubberduckCodeAnalysisUnitTests.cs">
Expand Down
10 changes: 1 addition & 9 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ before_build:
- cinst innosetup --version 6.0.5
# - cinst codecov
# - cinst gnupg
- cinst opencover.portable
- nuget restore RubberduckMeta.sln
- nuget restore Rubberduck.sln
build_script:
Expand All @@ -59,13 +58,9 @@ build_script:
# TestScript depends on the build matrix to only contain Release cpu
# Otherwise we might run tests against artifacts that do not exist
test_script:
# we use -returntargetcode to fail the build if tests fail
# when using test_script, after_test seems to not be executed
# Manually select coverage instrumentation using "-register:Path64" to fix coverage generation
# Limit number of visits recorded with threshold to improve performance
- |
OpenCover.Console.exe -register:Path64 -returntargetcode -target:"nunit3-console.exe" -threshold:10 -targetargs:".\RubberduckTests\bin\RubberduckTests.dll" -output:".\Rubberduck_Coverage.xml"
OpenCover.Console.exe -register:Path64 -returntargetcode -target:"nunit3-console.exe" -threshold:10 -targetargs:".\RubberduckTestsCodeAnalysis\bin\RubberduckTestsCodeAnalysis.dll" -output:".\RubberduckCodeAnalysis_Coverage.xml"
dotnet test /p:CollectCoverage:true /p:CoverletOutputFormat=cobertura /p:CoverletOutput=Combined_Coverage.xml
on_success:
- ps: |
Expand All @@ -82,9 +77,6 @@ on_success:
# gpg.exe --verify codecov.exe.SHA256SUM.sig codecov.exe.SHA256SUM
# If ($(Compare-Object -ReferenceObject $(($(certUtil -hashfile codecov.exe SHA256)[1], "codecov.exe") -join " ") -DifferenceObject $(Get-Content codecov.exe.SHA256SUM)).length -eq 0) { echo "SHASUM verified" } Else {exit 1}

# codecov -f "Rubberduck_Coverage.xml" -n "Main Project Coverage" --flag unit
# codecov -f "RubberduckCodeAnalysis_Coverage.xml" -n "Meta Coverage" --flag meta

# Define the installer-name depending on what branch we're building on
for:
-
Expand Down

0 comments on commit 97c0f73

Please sign in to comment.