1
- # Starter pipeline
2
- - task : DotNetCoreCLI@2
3
- inputs :
4
- command : ' build'
5
- - task : VSTest@2
6
- inputs :
7
- testSelector : ' testAssemblies'
8
- testAssemblyVer2 : |
9
- **\*test*.dll
10
- !**\*TestAdapter.dll
11
- !**\obj\**
12
- searchFolder : ' $(System.DefaultWorkingDirectory)'
13
- projects : ' dirs.sln'
14
- # Start with a minimal pipeline that you can customize to build and deploy your code.
15
- # Add steps that build, run tests, deploy, and more:
16
- # https://aka.ms/yaml
17
-
18
1
trigger :
19
- - main
2
+ - CosmosDB
20
3
21
4
pool :
22
- vmImage : ubuntu-latest
5
+ vmImage : ' windows-latest'
6
+
7
+ variables :
8
+ solution : ' **/dirs.sln'
9
+ buildPlatform : ' Any CPU'
10
+ buildConfiguration : ' Release'
23
11
24
12
steps :
25
- - script : echo Hello, world!
26
- displayName : ' Run a one-line script'
27
13
28
- - script : |
29
- echo Add other tasks to build, test, and deploy your project.
30
- echo See https://aka.ms/yaml
31
- displayName : ' Run a multi-line script'
14
+ - task : NuGetToolInstaller@1
15
+
16
+ - task : NuGetCommand@2
17
+ inputs :
18
+ restoreSolution : ' $(solution)'
32
19
20
+ - task : VSBuild@1
21
+ inputs :
22
+ solution : ' $(solution)'
23
+ msbuildArgs : ' /p:DeployOnBuild=false /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:DesktopBuildPackageLocation="$(build.artifactStagingDirectory)\WebApp.zip" /p:DeployIisAppPath="Default Web Site"'
24
+ platform : ' $(buildPlatform)'
25
+ configuration : ' $(buildConfiguration)'
26
+
27
+ - task : VSTest@2
28
+ inputs :
29
+ platform : ' $(buildPlatform)'
30
+ configuration : ' $(buildConfiguration)'
31
+
32
+ - script : dotnet test dirs.sln --logger trx
33
+ - task : PublishTestResults@2
34
+ condition : succeededOrFailed()
35
+ inputs :
36
+ testRunner : VSTest
37
+ testResultsFiles : ' **/*.trx'
0 commit comments