-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathe2e-test.yml
More file actions
109 lines (94 loc) · 4.61 KB
/
e2e-test.yml
File metadata and controls
109 lines (94 loc) · 4.61 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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
#
jobs:
- job: ${{ parameters.jobName }}
dependsOn:
- ${{ parameters.dependsOn }}
displayName: E2E Test
strategy:
matrix:
x64:
BuildPlatform: x64
timeoutInMinutes: 60 # how long to run the job before automatically cancelling
cancelTimeoutInMinutes: 5 # how much time to give 'run always even if cancelled tasks' before killing them
steps:
- task: NuGetToolInstaller@1
- task: CmdLine@2
displayName: yarn install
inputs:
script: "yarn install"
workingDirectory: $(Build.SourcesDirectory)\tests\RnWinRTTests
- task: PowerShell@2
displayName: "Enable Hermes if selected"
inputs:
targetType: filePath
filePath: $(Build.SourcesDirectory)\\tests\\TestArtifacts\\enableHermes.ps1
condition: eq('${{ parameters.useHermes }}', 'true')
- task: VSBuild@1
displayName: 'Build solution RnWinRTTests.sln'
continueOnError: true
inputs:
solution: tests\RnWinRTTests\windows\RnWinRTTests.sln
vsVersion: 'latest'
platform: 'x64'
configuration: 'Release'
- task: VSBuild@1
displayName: 'Build solution RnWinRTTests.sln'
inputs:
solution: tests\RnWinRTTests\windows\RnWinRTTests.sln
vsVersion: 'latest'
platform: 'x64'
configuration: 'Release'
- task: PowerShell@2
displayName: "Install RnWinRTTests Cert"
inputs:
targetType: "inline"
script: "Import-Certificate -FilePath $(Build.SourcesDirectory)\\tests\\Rnwinrttests\\windows\\AppPackages\\RnWinRTTests\\RnWinRTTests_1.0.0.0_x64_Test\\RnWinRTTests_1.0.0.0_x64.cer -CertStoreLocation Cert:\\LocalMachine\\Root"
condition: succeeded()
- task: PowerShell@2
displayName: "Install dependency - Microsoft.UI.Xaml.2.8"
inputs:
targetType: "inline"
script: "Add-AppxPackage $(Build.SourcesDirectory)\\tests\\RnWinRTTests\\windows\\AppPackages\\RnWinRTTests\\RnWinRTTests_1.0.0.0_x64_Test\\Dependencies\\x64\\Microsoft.UI.Xaml.2.8.appx"
condition: succeededOrFailed()
- task: PowerShell@2
displayName: "Install dependency - Microsoft.VCLibs.x64.14.00"
inputs:
targetType: "inline"
script: "Add-AppxPackage $(Build.SourcesDirectory)\\tests\\RnWinRTTests\\windows\\AppPackages\\RnWinRTTests\\RnWinRTTests_1.0.0.0_x64_Test\\Dependencies\\x64\\Microsoft.VCLibs.x64.14.00.appx"
condition: succeededOrFailed()
- task: PowerShell@2
displayName: "Install dependency - Microsoft.VCLibs.x64.14.00.Destktop"
inputs:
targetType: "inline"
script: "Add-AppxPackage $(Build.SourcesDirectory)\\tests\\RnWinRTTests\\windows\\AppPackages\\RnWinRTTests\\RnWinRTTests_1.0.0.0_x64_Test\\Dependencies\\x64\\Microsoft.VCLibs.x64.14.00.Desktop.appx"
condition: succeededOrFailed()
- task: PowerShell@2
displayName: "Install RnWinRTTests App"
inputs:
targetType: "inline"
script: "Add-AppxPackage $(Build.SourcesDirectory)\\tests\\RnWinRTTests\\windows\\AppPackages\\RnWinRTTests\\RnWinRTTests_1.0.0.0_x64_Test\\RnWinRTTests_1.0.0.0_x64.msix"
condition: succeededOrFailed()
- task: PowerShell@2
displayName: "Run RnWinRTTests"
inputs:
targetType: "inline"
script: "Start-Process -FilePath explorer.exe shell:appsFolder\\ade66fbb-2cb8-4ba7-b8e3-f0afcf0f7f3d_cw5n1h2txyewy!App"
condition: succeededOrFailed()
- task: CmdLine@2
displayName: Check for test failure
inputs:
script: if exist $(UserProfile)\AppData\Local\Packages\ade66fbb-2cb8-4ba7-b8e3-f0afcf0f7f3d_cw5n1h2txyewy\LocalState\FailureLog.txt (FAIL)
failOnStderr: true
- task: PublishBuildArtifacts@1
displayName: Upload failure log
condition: failed()
inputs:
pathtoPublish: '$(UserProfile)\AppData\Local\Packages\ade66fbb-2cb8-4ba7-b8e3-f0afcf0f7f3d_cw5n1h2txyewy\LocalState\FailureLog.txt'
artifactName: 'Failure log - $(Agent.JobName)-$(System.JobAttempt)'
- task: PowerShell@2
displayName: "Check if generated test TypeScript differs from expected output"
inputs:
targetType: filePath
filePath: $(Build.SourcesDirectory)\\tests\\TestArtifacts\\compareGeneratedTypeScript.ps1
arguments: -expectedFilesDir '$(Build.SourcesDirectory)\\tests\\TestArtifacts' -generatedFilesDir '$(Build.SourcesDirectory)\\tests\\RnWinRTTests\\windows\\WinRTTurboModule\\Generated Files\\types'
condition: succeededOrFailed()