-
-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathtest_drawing_libraries.yml
More file actions
92 lines (90 loc) · 4.11 KB
/
Copy pathtest_drawing_libraries.yml
File metadata and controls
92 lines (90 loc) · 4.11 KB
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
parameters:
name: ''
OSPlatform: ''
framework: ''
architecture: ''
buildConfiguration: ''
jobs:
- job: ${{ parameters.name }}
displayName: Execute ${{ parameters.framework }} ${{ parameters.architecture }} Unit Tests
steps:
- checkout: none
- task: DownloadPipelineArtifact@2
inputs:
buildType: 'current'
artifactName: 'IronDrawingTests'
targetPath: 'IronDrawingTests'
- task: DownloadPipelineArtifact@2
inputs:
buildType: 'current'
artifactName: 'IronDrawingDataTests'
targetPath: '$(Agent.BuildDirectory)/Data'
- ${{ if or(eq(parameters.OSPlatform, 'Ubuntu'), eq(parameters.OSPlatform, 'Linux')) }}:
- task: Bash@3
displayName: 'Install GDI+ dependencies'
inputs:
targetType: 'inline'
script: |
sudo apt-get update
sudo apt-get install -y libgdiplus libc6-dev
- ${{ if eq(parameters.framework, 'netcoreapp3.1') }}:
- task: UseDotNet@2
displayName: 'Install .Netcoreapp3.1 Core sdk'
inputs:
packageType: 'sdk'
version: '3.x'
- ${{ if eq(parameters.framework, 'net50') }}:
- task: UseDotNet@2
displayName: 'Install .NET5 sdk'
inputs:
packageType: 'sdk'
version: '5.x'
# .NET 7.0 need to install only on x86
- ${{ if and(eq(parameters.framework, 'net70'), eq(parameters.architecture, '.x86')) }}:
- task: UseDotNet@2
displayName: 'Install .NET7 sdk'
inputs:
packageType: 'sdk'
version: '7.x'
env:
PROCESSOR_ARCHITECTURE: x86
- ${{ if ne(parameters.framework, 'net60') }}:
- task: DotNetCoreCLI@2
displayName: Execute ${{ parameters.OSPlatform }} ${{ parameters.framework}} ${{ parameters.architecture }} Tests
inputs:
command: 'test'
projects: 'IronDrawingTests/${{ parameters.framework }}/IronSoftware.Drawing.Common.Tests.dll'
testRunTitle: '${{ parameters.OSPlatform }} ${{ parameters.framework}} ${{ parameters.architecture }} Tests'
publishTestResults: true
arguments: >-
-s IronDrawingTests/tests${{ parameters.architecture }}.runsettings
--framework "${{ parameters.framework }}"
-v d --blame
--diag:"$(Agent.BuildDirectory)\IronDrawingTests\bin\${{ parameters.buildConfiguration }}\${{ parameters.framework }}\testhost.log"
- ${{ if eq(parameters.framework, 'net60') }}:
- task: DotNetCoreCLI@2
displayName: Execute ${{ parameters.OSPlatform }} ${{ parameters.framework}} ${{ parameters.architecture }} Tests
inputs:
command: 'test'
projects: 'IronDrawingTests/${{ parameters.framework }}/IronSoftware.Drawing.Common.Tests.dll'
testRunTitle: '${{ parameters.OSPlatform }} ${{ parameters.framework}} ${{ parameters.architecture }} Tests'
publishTestResults: true
arguments: >-
-s IronDrawingTests/tests${{ parameters.architecture }}.runsettings
--framework "${{ parameters.framework }}"
-v d --blame --blame-hang --blame-crash --blame-hang-timeout 7m
--diag:"$(Agent.BuildDirectory)\IronDrawingTests\bin\${{ parameters.buildConfiguration }}\${{ parameters.framework }}\testhost.log"
--collect:"XPlat Code Coverage" -- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=cobertura
- task: PublishCodeCoverageResults@1
displayName: 'Publish code coverage report'
inputs:
codeCoverageTool: 'Cobertura'
summaryFileLocation: '$(Agent.TempDirectory)/**/coverage.cobertura.xml'
condition: succeededOrFailed()
# Upload Log files
- task: PublishPipelineArtifact@1
inputs:
targetPath: '$(Agent.BuildDirectory)\IronDrawingTests\bin\${{ parameters.buildConfiguration }}\${{ parameters.framework }}\testhost.log'
artifact: 'IronDrawing_testhost_${{ parameters.OSPlatform }}_${{ parameters.framework }}_${{ parameters.architecture }}_log_$(System.JobId)'
publishLocation: 'pipeline'
condition: always()