first commit
This commit is contained in:
@@ -0,0 +1,75 @@
|
||||
# ASP.NET Core 10.0
|
||||
# Build and test ASP.NET Core projects targeting .NET 10 on Linux.
|
||||
# https://learn.microsoft.com/en-us/azure/devops/pipelines/ecosystems/dotnet-core
|
||||
|
||||
# Pipeline triggers:
|
||||
# - Disabled: CI is fully covered by GitHub Actions (.github/workflows/dotnet-ci.yml)
|
||||
# - Kept for educational/reference purposes only
|
||||
trigger: none
|
||||
|
||||
pr: none
|
||||
|
||||
# Agent pool configuration (equivalent to GitHub Actions 'runs-on: ubuntu-latest')
|
||||
pool:
|
||||
vmImage: "ubuntu-latest"
|
||||
|
||||
# Environment variables (equivalent to GitHub Actions 'env:')
|
||||
variables:
|
||||
buildConfiguration: "Release"
|
||||
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 # Skip .NET welcome message
|
||||
DOTNET_NOLOGO: true # Suppress .NET logo in output
|
||||
NUGET_PACKAGES: $(Pipeline.Workspace)/.nuget/packages
|
||||
|
||||
# Pipeline steps (equivalent to GitHub Actions 'steps:')
|
||||
steps:
|
||||
# Checkout repository (equivalent to actions/checkout)
|
||||
# Azure Pipelines does this implicitly, but making it explicit for clarity
|
||||
- checkout: self
|
||||
displayName: "Checkout repository"
|
||||
|
||||
# Cache NuGet packages (equivalent to actions/setup-dotnet cache feature)
|
||||
# Uses packages.lock.json hash as cache key for faster restores
|
||||
- task: Cache@2
|
||||
displayName: "Cache NuGet packages"
|
||||
inputs:
|
||||
key: 'nuget | "$(Agent.OS)" | **/packages.lock.json'
|
||||
restoreKeys: |
|
||||
nuget | "$(Agent.OS)"
|
||||
path: $(NUGET_PACKAGES)
|
||||
|
||||
# Install .NET 10 SDK (equivalent to actions/setup-dotnet)
|
||||
# performMultiLevelLookup: allows finding other SDK versions if needed
|
||||
- task: UseDotNet@2
|
||||
displayName: "Set up .NET 10"
|
||||
inputs:
|
||||
version: "10.x"
|
||||
performMultiLevelLookup: true
|
||||
|
||||
# Restore NuGet packages (equivalent to 'dotnet restore')
|
||||
# feedsToUse: 'select' uses feeds from NuGet.config
|
||||
- task: DotNetCoreCLI@2
|
||||
displayName: "Restore dependencies"
|
||||
inputs:
|
||||
command: "restore"
|
||||
projects: "**/*.csproj"
|
||||
feedsToUse: "select"
|
||||
|
||||
# Build the solution (equivalent to 'dotnet build')
|
||||
# --no-restore: skip restore since we just did it (faster build)
|
||||
- task: DotNetCoreCLI@2
|
||||
displayName: "Build projects"
|
||||
inputs:
|
||||
command: "build"
|
||||
projects: "**/*.sln"
|
||||
arguments: "--configuration $(buildConfiguration) --no-restore"
|
||||
|
||||
# Run unit tests (equivalent to 'dotnet test')
|
||||
# --no-build: use already-built assemblies (faster)
|
||||
# publishTestResults: automatically publish test results to Azure DevOps (built-in feature)
|
||||
- task: DotNetCoreCLI@2
|
||||
displayName: "Run tests"
|
||||
inputs:
|
||||
command: "test"
|
||||
projects: "**/*Tests/*.csproj"
|
||||
arguments: "--configuration $(buildConfiguration) --no-build"
|
||||
publishTestResults: true
|
||||
Reference in New Issue
Block a user