Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

contoso-webapi

Lab repo for Challenge 20 — Azure Pipelines YAML (and the .NET half of Challenge 23).

The exam tests both platforms. contoso-api is your GitHub Actions app; this is your Azure Pipelines app.

Contoso.Api.sln
src/Contoso.Api/          controllers, models, services (.NET 8)
src/Contoso.Api.Tests/    xUnit: 5 unit + 4 integration via WebApplicationFactory
infra/main.bicep          App Service + staging slot
infra/parameters/         staging.json, production.json
pipelines/                EMPTY - you write these
nuget.config              package source mapping; add your Azure Artifacts feed in Challenge 13

Verify it works

dotnet build                                # 0 warnings, 0 errors
dotnet test --collect:"XPlat Code Coverage" # 10 passed
az bicep build --file infra/main.bicep --stdout > /dev/null

dotnet test writes coverage.cobertura.xml — exactly what PublishCodeCoverageResults@2 wants.

Note on the SDK

.NET 8 SDK is installed at %LOCALAPPDATA%\Microsoft\dotnet. It is not on your PATH. Either call it by full path, or add it:

$env:Path += ";$env:LOCALAPPDATA\Microsoft\dotnet"

You do not strictly need it — Microsoft-hosted agents already have .NET. It is only for running the blind tests locally.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages