forked from unoplatform/uno
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.azure-devops-wasm-uitests.yml
90 lines (72 loc) · 2.66 KB
/
.azure-devops-wasm-uitests.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
parameters:
pool: ''
jobs:
- job: Wasm_UITests
container: nv-bionic-wasm
pool:
vmImage: 'ubuntu-16.04'
variables:
NUGET_PACKAGES: $(build.sourcesdirectory)/.nuget
steps:
- checkout: self
clean: true
- bash: |
source /emsdk/emsdk_env.sh
msbuild /r /p:Configuration=Release /t:restore src/SamplesApp/SamplesApp.Wasm/SamplesApp.Wasm.csproj
msbuild /p:Configuration=Release /p:TargetFramework=netstandard2.0 src/SamplesApp/SamplesApp.Wasm/SamplesApp.Wasm.csproj /p:UnoSourceGeneratorUseGenerationHost=true /p:UnoSourceGeneratorUseGenerationController=false
displayName: 'Build sample app'
- bash: |
cd $(build.sourcesdirectory)/src/SamplesApp/SamplesApp.Wasm/bin/Release/netstandard2.0/dist
python server.py &
cd $(build.sourcesdirectory)/src/SamplesApp/SamplesApp.Wasm.UITests
npm install
node app
displayName: 'Running UI Tests'
- task: CopyFiles@2
displayName: 'Publish Wasm Tests results'
inputs:
SourceFolder: $(build.sourcesdirectory)/src/SamplesApp/SamplesApp.Wasm.UITests/out
Contents: '**/*.*'
TargetFolder: $(build.artifactstagingdirectory)/screenshots
CleanTargetFolder: false
OverWrite: false
flattenFolders: false
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: $(build.artifactstagingdirectory)
ArtifactName: wasm-uitests
ArtifactType: Container
- job: Wasm_UITests_Compare
dependsOn: Wasm_UITests
pool:
vmImage: 'vs2017-win2016'
steps:
- checkout: self
clean: true
- task: NuGetToolInstaller@0
inputs:
versionSpec: 4.9.1
checkLatest: false
- task: MSBuild@1
inputs:
solution: src/Uno.UI.TestComparer/Uno.UI.TestComparer.csproj
msbuildLocationMethod: version
msbuildVersion: latest
msbuildArchitecture: x86
msbuildArguments: /r "/p:Configuration=Release"
clean: false
maximumCpuCount: true
restoreNugetPackages: false
logProjectEvents: false
createLogFile: false
- script: |
src\Uno.UI.TestComparer\bin\Release\net461\Uno.UI.TestComparer.exe "azdo" "$(UITestsCompare_PAT)" "$(build.artifactstagingdirectory)" "%GIT_SOURCEBRANCH%" "%GIT_TARGETBRANCH%" "wasm-uitests" "$(Build.DefinitionName)" "$(System.TeamProject)" "$(System.TeamFoundationCollectionUri)" "$(Build.BuildId)" "3"
env:
GIT_TARGETBRANCH: "$(System.PullRequest.TargetBranch)"
GIT_SOURCEBRANCH: "$(Build.SourceBranch)"
displayName: 'Compare UI Tests screenshots'
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: $(build.artifactstagingdirectory)
ArtifactName: wasm-uitests-compare-results
ArtifactType: Container