azure-pipelines.yml 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. trigger:
  2. - dev
  3. - master
  4. pool:
  5. vmImage: 'windows-latest'
  6. variables:
  7. solution: '**/*.sln'
  8. buildPlatform: 'Any CPU'
  9. buildConfiguration: 'Release'
  10. steps:
  11. - task: NuGetToolInstaller@1
  12. - task: NuGetCommand@2
  13. inputs:
  14. restoreSolution: '$(solution)'
  15. - task: DotNetCoreCLI@2
  16. inputs:
  17. command: 'custom'
  18. custom: 'tool'
  19. arguments: 'install --global Codecov.Tool'
  20. - task: DotNetCoreCLI@2
  21. displayName: Build
  22. inputs:
  23. command: 'build'
  24. projects: '**/*.csproj'
  25. arguments: '--configuration Release'
  26. - task: DotNetCoreCLI@2
  27. displayName: Tests
  28. inputs:
  29. command: test
  30. projects: '**/*Tests/*.csproj'
  31. arguments: '--configuration $(buildConfiguration) --collect "Code coverage"'
  32. - task: PowerShell@2
  33. inputs:
  34. targetType: 'inline'
  35. script: '& "$env:userprofile\.nuget\packages\opencover\4.7.922\tools\OpenCover.Console.exe" -register -target:"$env:programfiles/dotnet/dotnet.exe" -targetargs:test -filter:"+[*]*" -output:".\PixiEditor_coverage.xml" -oldstyle'
  36. workingDirectory: 'PixiEditorTests\'
  37. displayName: Collect code coverage
  38. - task: CmdLine@2
  39. inputs:
  40. script: codecov -f .\PixiEditorTests\PixiEditor_coverage.xml -t $(CODECOV_TOKEN)
  41. displayName: Upload to Codecov.io