-
Notifications
You must be signed in to change notification settings - Fork 18
/
azure-pipelines.yml
106 lines (87 loc) · 2.69 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
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
trigger: none # will disable CI builds entirely
pr:
- master
pool:
vmImage: 'windows-2019'
steps:
- checkout: self
clean: true
lfs: false
persistCredentials: false
- task: CmdLine@2
displayName: yarn install
inputs:
script: yarn install
- task: CmdLine@2
displayName: yarn run prepublishOnly
inputs:
script: yarn run prepublishOnly
- task: PowerShell@2
displayName: 'Replace the AppID'
inputs:
targetType: 'inline'
script: '((Get-Content -path example/Setup.ts -Raw) -replace "Microsoft.WindowsCalculator_8wekyb3d8bbwe!App","Microsoft.WindowsCalculator.Dev_8wekyb3d8bbwe!App") | Set-Content -Path example/Setup.ts'
- task: PowerShell@2
displayName: 'Show the AppID'
inputs:
targetType: 'inline'
script: 'Get-Content example/Setup.ts | foreach {Write-Output $_}'
- task: CmdLine@2
displayName: yarn install
inputs:
script: yarn install
workingDirectory: 'example'
- task: DeleteFiles@1
displayName: Remove offical selenium-appium\dist
inputs:
SourceFolder: 'example\node_modules\selenium-appium\dist'
Contents: '*'
- task: CopyFiles@2
displayName: copy built selenium-appium\dist
inputs:
SourceFolder: 'dist'
Contents: '**'
TargetFolder: 'example\node_modules\selenium-appium\dist'
OverWrite: true
- task: DownloadGitHubRelease@0
inputs:
connection: 'react-native-windows'
userRepository: 'react-native-windows/CalculatorPackage'
defaultVersionType: 'latest'
downloadPath: '$(System.ArtifactsDirectory)'
- task: ExtractFiles@1
inputs:
archiveFilePatterns: '$(System.ArtifactsDirectory)/*.zip'
destinationFolder: 'TestApp'
cleanDestinationFolder: true
- task: PowerShell@1
displayName: 'Install Calculator Cert'
inputs:
scriptType: inlineScript
arguments: '-NonInteractive -Verb RunAs'
inlineScript: |
$file = ( Get-ChildItem -Path TestApp\Calculator_$(PackageManifest)_Test\Calculator_$(PackageManifest)_x64.cer )
$file | Import-Certificate -CertStoreLocation cert:\LocalMachine\Root
- task: PowerShell@1
displayName: 'Install Calculator Packages'
inputs:
scriptName: 'TestApp\Calculator_$(PackageManifest)_Test\Add-AppDevPackage.ps1'
arguments: '-NonInteractive -Force:$true -Verb RunAs'
- task: Windows Application Driver@0
inputs:
OperationType: 'Start'
WADArguments: 127.0.0.1 4723
AgentResolution: 1080p
- task: CmdLine@2
inputs:
script: 'yarn run jest'
workingDirectory: 'example'
- task: Windows Application Driver@0
inputs:
OperationType: 'Stop'
condition: succeededOrFailed()
- task: PublishTestResults@2
inputs:
testResultsFormat: 'JUnit'
testResultsFiles: 'example/test-report.xml'
condition: succeededOrFailed()