-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest-pipeline.yml
77 lines (68 loc) · 2.56 KB
/
test-pipeline.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
# Set trigger as required for the target Atlas environment
trigger: none
pr: none
pool:
vmImage: 'windows-latest'
variables:
buildPlatform: 'Any CPU'
buildConfiguration: 'Release'
NUGET_PACKAGES: $(Pipeline.Workspace)/.nuget/packages
stages:
- stage: build
displayName: "Build"
jobs:
- job:
displayName: 'Restore Cache and Build'
steps:
- task: UseDotNet@2
displayName: 'Install .NET Core SDK'
inputs:
packageType: 'sdk'
version: 8.0.x
- task: FileTransform@2
# Pipeline must have variables that match those in appsettings.json.
# Use `.` to retrieve nested values, e.g., var name `DonorImport.ApiKey` would be used to fetch setting:`{ "DonorImport": { "ApiKey": "value" } }`
displayName: 'Set environment variables'
inputs:
folderPath: '$(System.DefaultWorkingDirectory)'
xmlTransformationRules: '' # Prevents task error: "Unable to apply transformation for the given package - Changes are already present in the package."
jsonTargetFiles: '**/appsettings.json'
continueOnError: false
- task: DotNetCoreCLI@2
displayName: 'Restore'
inputs:
command: 'restore'
projects: "**/Atlas.Auto.Tests.csproj"
feedsToUse: 'select'
vstsFeed: $(ATLAS_AZURE_ARTIFACTS_FEED_NAME_OR_ID)
includeNuGetOrg: true
- task: DotNetCoreCLI@2
displayName: 'Build'
inputs:
command: 'build'
projects: '**/Atlas.Auto.Tests.csproj'
arguments: '--configuration $(buildConfiguration) --no-restore'
- task: CopyFiles@2
displayName: 'Copy Test artifacts for later use in the pipeline'
inputs:
contents: 'Atlas.Auto.Tests/bin/Release/net8.0/**'
targetFolder: '$(Build.ArtifactStagingDirectory)'
- publish: '$(Build.ArtifactStagingDirectory)'
displayName: 'Publish Test artifacts for later use in the pipeline'
artifact: dropTestSuite
- stage: runTests
displayName: "Run Tests"
jobs:
- template: azure-test-run-template.yml
parameters:
testCategoryJobs:
- job: HealthCheck
- job: DonorImport_DiffMode_HappyPathTests
- job: DonorImport_DiffMode_ExceptionPathTests
- job: DonorImport_FullMode_ExceptionPathTests
- job: Search_HappyPathTests
- job: Search_ExceptionPathTests
- job: Scoring_HappyPathTests
- job: RepeatSearch_HappyPathTests_Adult
- job: RepeatSearch_HappyPathTests_Cord
- job: RepeatSearch_ExceptionPathTests