37 lines
928 B
YAML
37 lines
928 B
YAML
# ASP.NET Core
|
|
# Build and test ASP.NET Core projects targeting .NET Core.
|
|
# Add steps that run tests, create a NuGet package, deploy, and more:
|
|
# https://docs.microsoft.com/azure/devops/pipelines/languages/dotnet-core
|
|
|
|
trigger:
|
|
- master
|
|
|
|
pool:
|
|
vmImage: 'windows-2022'
|
|
|
|
variables:
|
|
buildConfiguration: 'Release'
|
|
|
|
steps:
|
|
- task: UseDotNet@2
|
|
displayName: 'Install .NET Core SDK'
|
|
inputs:
|
|
version: 10.0.x
|
|
performMultiLevelLookup: true
|
|
includePreviewVersions: true # Required for preview versions
|
|
|
|
- script: dotnet restore
|
|
workingDirectory: src
|
|
displayName: 'dotnet restore'
|
|
|
|
- script: dotnet build --configuration $(buildConfiguration) -p:ci=true
|
|
workingDirectory: src
|
|
displayName: 'dotnet build $(buildConfiguration)'
|
|
|
|
- task: DotNetCoreCLI@2
|
|
displayName: 'dotnet test'
|
|
inputs:
|
|
command: test
|
|
projects: 'tests/*Tests/*.csproj'
|
|
arguments: '--configuration $(buildConfiguration) --no-build'
|