浏览代码

Switch codecov to use global tool

Oren Novotny 6 年之前
父节点
当前提交
38cf3f108d
共有 1 个文件被更改,包括 9 次插入3 次删除
  1. 9 3
      azure-pipelines.ix.yml

+ 9 - 3
azure-pipelines.ix.yml

@@ -81,9 +81,15 @@ steps:
     summaryFileLocation: '$(Build.SourcesDirectory)/Ix.NET/Source/coverlet/reports/Cobertura.xml'
     reportDirectory: '$(Build.SourcesDirectory)/Ix.NET/Source/coverlet/reports'
 
-- script: |
-    choco install codecov
-    codecov -f $(Build.SourcesDirectory)/Ix.NET/Source/coverlet/reports/Cobertura.xml --flag ixnet
+- task: DotNetCoreCLI@2  
+  inputs:
+    command: custom
+    custom: tool
+    arguments: install --tool-path . Codecov.Tool
+  displayName: Install Codecov tool
+  condition: and(succeeded(), not(eq(variables['CODECOV_TOKEN'], '')))
+
+- script: codecov -f $(Build.SourcesDirectory)/Ix.NET/Source/coverlet/reports/Cobertura.xml --flag ixnet
   env:
     CODECOV_TOKEN: $(CODECOV_TOKEN)
   displayName: Upload coverage to Codecov