pool:
  name: Azure Pipelines
  vmImage: windows-latest
  demands:
  - msbuild
  - visualstudio
  - vstest

jobs:
- job: Build
  variables:
    BuildSolution: StyleCopAnalyzers.sln
    BuildPlatform: Any CPU
  strategy:
    matrix:
      Debug:
        BuildConfiguration: Debug
        _debugArg: '-Debug'
      Release:
        BuildConfiguration: Release
        _debugArg: ''
  steps:
  - task: NuGetToolInstaller@0
    displayName: 'Use NuGet 5.3.1'
    inputs:
      versionSpec: 5.3.1

  - task: NuGetCommand@2
    displayName: 'NuGet restore'
    inputs:
      restoreSolution: '$(BuildSolution)'
      feedsToUse: 'config'
      nugetConfigPath: 'NuGet.config'

  - task: VSBuild@1
    displayName: 'Build solution StyleCopAnalyzers.sln'
    inputs:
      solution: '$(BuildSolution)'
      platform: '$(BuildPlatform)'
      configuration: '$(BuildConfiguration)'

  - task: PowerShell@2
    displayName: Run Tests
    inputs:
      workingDirectory: '$(Build.SourcesDirectory)/build'
      filePath: opencover-report.ps1
      arguments: '$(_debugArg) -NoBuild -NoReport'

pool:
  name: Azure Pipelines
  vmImage: windows-latest
  demands:
  - msbuild
  - visualstudio
  - vstest

jobs:
- job: Build
  variables:
    BuildSolution: StyleCopAnalyzers.sln
    BuildPlatform: Any CPU
  strategy:
    matrix:
      Debug:
        BuildConfiguration: Debug
        _debugArg: '-Debug'
      Release:
        BuildConfiguration: Release
        _debugArg: ''
  steps:
  - task: NuGetToolInstaller@0
    displayName: 'Use NuGet 5.3.1'
    inputs:
      versionSpec: 5.3.1

  - task: NuGetCommand@2
    displayName: 'NuGet restore'
    inputs:
      restoreSolution: '$(BuildSolution)'
      feedsToUse: 'config'
      nugetConfigPath: 'NuGet.config'

  - task: VSBuild@1
    displayName: 'Build solution StyleCopAnalyzers.sln'
    inputs:
      solution: '$(BuildSolution)'
      platform: '$(BuildPlatform)'
      configuration: '$(BuildConfiguration)'

  - task: PowerShell@2
    displayName: Run Tests
    inputs:
      workingDirectory: '$(Build.SourcesDirectory)/build'
      filePath: build/opencover-report.ps1
      arguments: '$(_debugArg) -NoBuild -NoReport'

Set filePath relative to checkout directory
Set filePath relative to checkout directory
