@@ -50,11 +50,15 @@ dotnet_csproj:
50
50
version : ' {version}'
51
51
assembly_version : ' {version}'
52
52
53
+ # set up the environment variables used later in the build process
54
+ environment :
55
+ installer_dir : Rubberduck.Deployment\InnoSetup\Installers\
56
+ codecov_token :
57
+ secure : WXzsqA7du+xTCQN0p06UFYOe94bKkB1ZtyCWS0Xlsu7OwIwKIa/OPaHj8Yev1JGl
53
58
54
59
before_build :
55
60
- development/java/Rubberduck.Parsing/Grammar/gradlew.bat -p development/java/Rubberduck.Parsing/Grammar clean build
56
61
- cinst innosetup -version 5.6.1
57
- - cinst codecov
58
62
- cinst opencover.portable
59
63
- nuget restore RubberduckMeta.sln
60
64
- nuget restore Rubberduck.sln
@@ -66,14 +70,16 @@ build:
66
70
# Otherwise we might run tests against artifacts that do not exist
67
71
test_script :
68
72
# we use -returntargetcode to fail the build if tests fail
69
- - cmd : OpenCover.Console.exe -register:user -returntargetcode -target:"nunit3-console.exe" -targetargs:".\RubberduckTests\bin\RubberduckTests.dll" -output:".\Rubberduck_Coverage.xml"
70
- - cmd : OpenCover.Console.exe -register:user -returntargetcode -target:"nunit3-console.exe" -targetargs:".\RubberduckTestsCodeAnalysis\bin\RubberduckTestsCodeAnalysis.dll" -output:".\RubberduckCodeAnalysis_Coverage.xml"
71
73
# when using test_script, after_test seems to not be executed
72
- - cmd : codecov -f "Rubberduck_Coverage.xml RubberduckCodeAnalysis_Coverage.xml"
74
+ # Manually select coverage instrumentation using "-register:Path64" to fix coverage generation
75
+ # Limit number of visits recorded with threshold to improve performance
76
+ - |
77
+ OpenCover.Console.exe -register:Path64 -returntargetcode -target:"nunit3-console.exe" -threshold:10 -targetargs:".\RubberduckTests\bin\RubberduckTests.dll" -output:".\Rubberduck_Coverage.xml"
78
+ OpenCover.Console.exe -register:Path64 -returntargetcode -target:"nunit3-console.exe" -threshold:10 -targetargs:".\RubberduckTestsCodeAnalysis\bin\RubberduckTestsCodeAnalysis.dll" -output:".\RubberduckCodeAnalysis_Coverage.xml"
79
+ curl --silent https://codecov.io/bash --output codecov
80
+ bash codecov -f Rubberduck_Coverage.xml -f RubberduckCodeAnalysis_Coverage.xml
73
81
74
82
# Define the installer-name depending on what branch we're building on
75
- environment :
76
- installer_dir : Rubberduck.Deployment\InnoSetup\Installers\
77
83
for :
78
84
-
79
85
branches :
@@ -116,6 +122,10 @@ artifacts:
116
122
name : InspectionDocs
117
123
- path : Rubberduck.Deployment\InnoSetup\Installers\*.hash
118
124
name : InstallerHashes
125
+ - path : Rubberduck_Coverage.xml
126
+ name : MainCoverage
127
+ - path : RubberduckCodeAnalysis_Coverage.xml
128
+ name : AnalysisCoverage
119
129
deploy :
120
130
- provider : GitHub
121
131
tag : RETAGMEWITHAMESSAGE
0 commit comments