From 8c2276cb06573b77dc1ad98eb8e0121df94516a8 Mon Sep 17 00:00:00 2001 From: ravensorb Date: Tue, 7 Jan 2020 10:31:56 -0500 Subject: [PATCH] Updated build scripts --- azure-pipelines.yml | 56 ++++++++++++++++++++++++--------------------- 1 file changed, 30 insertions(+), 26 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 81eada7..5dfe840 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -10,9 +10,15 @@ pool: vmImage: 'windows-latest' variables: - solution: '**/*.sln' - buildPlatform: 'Any CPU' - buildConfiguration: 'Release' + - group: Invisionware.Collections + - name: solution + value: '**/*.sln' + - name: buildPlatform + value: 'Any CPU' + - name: buildConfiguration + value: 'Release' + - name: buildTarget + value: 'Nuget-Package' steps: - task: NuGetToolInstaller@1 @@ -23,38 +29,36 @@ steps: inputs: restoreSolution: '$(solution)' +- task: replacetokens@3 + displayName: 'Transform appsetings.json' + inputs: + rootDirectory: '$(Build.SourcesDirectory)/tests' + targetFiles: '**/appSettings.json' + encoding: 'auto' + writeBOM: true + escapeType: 'json' + verbosity: 'detailed' + actionOnMissing: 'warn' + keepToken: false + tokenPrefix: '#{' + tokenSuffix: '}#' + - task: Cake@0 displayName: 'Build Solution: Cake' inputs: script: 'build.cake' - target: 'Nuget-Package' + target: '$(buildTarget)' verbosity: 'Verbose' - arguments: '-NugetArtifactsPath=$(Build.ArtifactStagingDirectory) -configuration=$(buildConfiguration)' - -- task: VSBuild@1 - displayName: 'Build Solution' - enabled: false - inputs: - solution: '$(solution)' - platform: '$(buildPlatform)' - configuration: '$(buildConfiguration)' - clean: true - createLogFile: true - -- task: DotNetCoreCLI@2 - enabled: false - displayName: 'NUnit Tests: Run' - inputs: - command: 'test' - projects: '$(solution)' + arguments: '-NugetArtifactsPath=$(Build.ArtifactStagingDirectory) -configuration=$(buildConfiguration)' - task: PublishTestResults@2 - displayName: 'NUnit Tests: Publish results' - enabled: false + displayName: 'Unit Tests: Publish results' + enabled: true inputs: - testResultsFormat: 'NUnit' - testResultsFiles: 'tests/**/TEST-*.xml' + testResultsFormat: 'VSTest' + testResultsFiles: '$(Build.SourcesDirectory)/artifacts/tests/**/*.trx' mergeTestResults: true + failTaskOnFailedTests: true - task: PublishBuildArtifacts@1 displayName: 'Publish Artifacts'