-
Notifications
You must be signed in to change notification settings - Fork 71
/
azure-pipelines.yml
77 lines (69 loc) · 2.19 KB
/
azure-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# CI and PR triggers
trigger:
- main
- rel/*
pr:
- main
- rel/*
variables:
# Cannot use key:value syntax in root defined variables
- name: _TeamName
value: UnitTesting
- name: CodeQL.Enabled
value: false
- name: _RunAsInternal
value: False
- name: _RunAsPublic
value: True
stages:
- stage: build
displayName: Build
jobs:
- template: /eng/common/templates/jobs/jobs.yml
parameters:
enableMicrobuild: true
enablePublishBuildArtifacts: true
enablePublishBuildAssets: true
enablePublishUsingPipelines: true
enablePublishTestResults: true
enableTelemetry: true
enableSourceBuild: true
testResultsFormat: 'vstest'
helixRepo: dotnet/test-templates
jobs:
- job: Windows
pool:
name: NetCore-Public
demands: ImageOverride -equals windows.vs2022preview.amd64.open
strategy:
matrix:
Release:
_BuildConfig: Release
Debug:
_BuildConfig: Debug
steps:
- checkout: self
clean: true
- script: eng\common\cibuild.cmd
-configuration $(_BuildConfig)
-prepareMachine
/p:Test=false
displayName: Build
- task: PublishBuildArtifacts@1
displayName: 'Publish VSSetup'
inputs:
PathtoPublish: '$(Build.SourcesDirectory)/artifacts/VSSetup/$(_BuildConfig)'
ArtifactName: VSSetupArtifacts
- task: DotNetCoreCLI@2
displayName: 'Acceptance tests'
inputs:
command: test
projects: 'test\Microsoft.TestTemplates.Acceptance.Tests.sln'
publishTestResults: false
arguments: '--configuration $(_BuildConfig) --logger trx --results-directory $(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)'
- task: PublishBuildArtifacts@1
displayName: 'Publish acceptance tests logs'
inputs:
PathtoPublish: '$(Build.SourcesDirectory)/artifacts/bin/Microsoft.TestTemplates.Acceptance.Tests/Debug/net9.0/TestResults/Microsoft.TestTemplates.Acceptance.Tests_net9.0_x64.log'
ArtifactName: AcceptanceTestsLogs
condition: failed()