Skip to content

Instantly share code, notes, and snippets.

@chadmcrowell
Created November 4, 2019 20:44
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save chadmcrowell/f92df0e2f4af1020fe60258e72a4ce9c to your computer and use it in GitHub Desktop.
Save chadmcrowell/f92df0e2f4af1020fe60258e72a4ce9c to your computer and use it in GitHub Desktop.
Lesson: Automated and Manual Tests
pool:
vmImage: 'Ubuntu-16.04'
demands:
- npm
steps:
- task: DotNetCoreInstaller@0
displayName: 'Use .NET Core SDK 2.1.505'
inputs:
version: 2.1.505
- task: Npm@1
displayName: 'Run npm install'
inputs:
verbose: false
- script: './node_modules/.bin/node-sass Tailspin.SpaceGame.Web/wwwroot --output Tailspin.SpaceGame.Web/wwwroot'
displayName: 'Compile Sass assets'
- task: gulp@1
displayName: 'Run gulp tasks'
- script: 'echo "$(Build.DefinitionName), $(Build.BuildId), $(Build.BuildNumber)" > buildinfo.txt'
displayName: 'Write build info'
workingDirectory: Tailspin.SpaceGame.Web/wwwroot
- task: DotNetCoreCLI@2
displayName: 'Restore project dependencies'
inputs:
command: 'restore'
projects: '**/*.csproj'
- task: DotNetCoreCLI@2
displayName: 'Build the project - Release'
inputs:
command: 'build'
arguments: '--no-restore --configuration Release'
projects: '**/*.csproj'
- task: DotNetCoreCLI@2
displayName: 'Run unit tests - Release'
inputs:
command: 'test'
arguments: '--no-build --configuration Release'
publishTestResults: true
projects: '**/*.csproj'
- task: DotNetCoreCLI@2
displayName: 'Publish the project - Release'
inputs:
command: 'publish'
projects: '**/*.csproj'
publishWebProjects: false
arguments: '--no-build --configuration Release --output $(Build.ArtifactStagingDirectory)/Release'
zipAfterPublish: true
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: drop'
condition: succeeded()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment