-
Notifications
You must be signed in to change notification settings - Fork 21
/
job-template.yml
59 lines (58 loc) · 1.7 KB
/
job-template.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
parameters:
testAssembly: ''
displayName: ''
jobs:
- job: ${{ parameters.displayName }}
variables:
defaultWorkingDir: '$(System.DefaultWorkingDirectory)\CS'
runSettingsPath: '$(defaultWorkingDir)\Tests\Tests.runsettings'
testsFolderPath: '$(defaultWorkingDir)\Tests'
dxFeedVar: '$(DXFeed)'
NUGET_PACKAGES: $(Pipeline.Workspace)/.nuget/packages
strategy:
matrix:
Admin: {}
Sales: {}
Support: {}
Management: {}
Engineering: {}
IT: {}
Shipping: {}
HumanResources: {}
timeoutInMinutes: 90
pool:
name: Self
steps:
- task: PowerShell@2
displayName: Build
continueOnError: false
inputs:
targetType: 'inline'
script: |
Write-Output "${{ parameters.testAssembly }}"
& sqllocaldb start mssqllocaldb
dotnet nuget add source $(dxFeedVar) --name DX
cd "$(defaultWorkingDir)"
dotnet build --configuration TEST
Get-ChildItem -Path "$(testsFolderPath)" -Recurse -Directory -Include "ref", "refint", "obj" |
ForEach-Object { Remove-Item $_.FullName -Recurse -Force }
pwsh: true
- task: VSTest@3
displayName: ${{ parameters.displayName }}
continueOnError: false
env:
TEST_ROLE: $(Agent.JobName)
BingKey: $(BingKey)
enabled: true
inputs:
minimumExpectedTests: "1"
failOnMinTestsNotRun: true
rerunFailedTests: false
searchFolder: $(testsFolderPath)
testSelector: 'testAssemblies'
testAssemblyVer2: ${{ parameters.testAssembly }}
testFiltercriteria: TestCategory=Tests
diagnosticsEnabled: true
codeCoverageEnabled: true
uiTests: true
runSettingsFile: $(runSettingsPath)