2626 command : custom
2727 verbose : false
2828 customCommand : ' run build'
29+ - bash : sed -i.bak 's/"\*"//g' package.json
30+ displayName : ' Enable full coverage'
2931 - task : Npm@1
3032 displayName : ' Run tests'
3133 inputs :
3941 testResultsFiles : ' test-reports/*.xml'
4042 mergeTestResults : true
4143 testRunTitle : ' $(Agent.OS) $(Agent.JobName)'
44+ - task : PublishCodeCoverageResults@1
45+ displayName : ' Publish Code Coverage to Azure'
46+ inputs :
47+ codeCoverageTool : Cobertura
48+ summaryFileLocation : ' $(System.DefaultWorkingDirectory)/coverage/cobertura-coverage.xml'
49+ reportDirectory : ' $(System.DefaultWorkingDirectory)/coverage/lcov-report'
50+ - script : node_modules\.bin\codecov --disable=gcov
51+ displayName : ' Publish Code Coverage to Codecov'
52+ env :
53+ CODECOV_TOKEN : $(codecovToken)
4254 - job : macOS
4355 strategy :
4456 matrix :
6678 command : custom
6779 verbose : false
6880 customCommand : ' run build'
81+ - bash : sed -i.bak 's/"\*"//g' package.json
82+ displayName : ' Enable full coverage'
6983 - task : Npm@1
7084 displayName : ' Run tests'
7185 inputs :
7993 testResultsFiles : ' test-reports/*.xml'
8094 mergeTestResults : true
8195 testRunTitle : ' $(Agent.OS) $(Agent.JobName)'
96+ - task : PublishCodeCoverageResults@1
97+ displayName : ' Publish Code Coverage to Azure'
98+ inputs :
99+ codeCoverageTool : Cobertura
100+ summaryFileLocation : ' $(System.DefaultWorkingDirectory)/coverage/cobertura-coverage.xml'
101+ reportDirectory : ' $(System.DefaultWorkingDirectory)/coverage/lcov-report'
102+ - script : node_modules/.bin/codecov --disable=gcov
103+ displayName : ' Publish Code Coverage to Codecov'
104+ env :
105+ CODECOV_TOKEN : $(codecovToken)
82106 - job : Linux
83107 strategy :
84108 matrix :
@@ -117,6 +141,8 @@ jobs:
117141 /usr/bin/Xvfb :10 -ac >> /tmp/Xvfb.out 2>&1 &
118142 disown -ar
119143 displayName: 'Start xvfb'
144+ - bash : sed -i.bak 's/"\*"//g' package.json
145+ displayName : ' Enable full coverage'
120146 - task : Npm@1
121147 displayName : ' Run tests'
122148 inputs :
@@ -132,6 +158,16 @@ jobs:
132158 testResultsFiles : ' test-reports/*.xml'
133159 mergeTestResults : true
134160 testRunTitle : ' $(Agent.OS) $(Agent.JobName)'
161+ - task : PublishCodeCoverageResults@1
162+ displayName : ' Publish Code Coverage to Azure'
163+ inputs :
164+ codeCoverageTool : Cobertura
165+ summaryFileLocation : ' $(System.DefaultWorkingDirectory)/coverage/cobertura-coverage.xml'
166+ reportDirectory : ' $(System.DefaultWorkingDirectory)/coverage/lcov-report'
167+ - script : node_modules/.bin/codecov --disable=gcov
168+ displayName : ' Publish Code Coverage to Codecov'
169+ env :
170+ CODECOV_TOKEN : $(codecovToken)
135171 - job : Release
136172 condition : and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
137173 dependsOn :
0 commit comments