Azure Devops Basics Part-3 | CI-CD pipeline for web Api and unit test execution in pipeline

YAML Pipeline basics | Unit test in YAML pipeline | Azure Devops Basics | YouTube Video on Azure Devops

Sanjeevi Subramani's photo
Sanjeevi Subramani

Published on Nov 4, 2021

1 min read

Subscribe to my newsletter and never miss my upcoming articles

Azure Devops Basics Part-3 YouTube Video

YAML Pipeline created in this session:

# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml

trigger:
- main

pool:
  vmImage: ubuntu-latest

steps:

- task: DotNetCoreCLI@2
  displayName: Console app build
  inputs:
    command: 'build'
    projects: 'ConsoleAppTestBuild/ConsoleAppTestBuild/ConsoleAppTestBuild.csproj'
    arguments: 

- task: DotNetCoreCLI@2
  displayName: Web api app build
  inputs:
    command: 'build'
    projects: 'BasicWebapiUnitTest/BasicWebapiUnitTest/BasicWebapiUnitTest.csproj'

- task: DotNetCoreCLI@2
  displayName: Web api unit test build
  inputs:
    command: 'test'
    projects: 'BasicWebapiUnitTest/TestProjectBasicApi/TestProjectBasicApi.csproj'

All the code used in the demo in below repo:

 
Share this