-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathazure-pipelines-merge.yml
111 lines (109 loc) · 3.59 KB
/
azure-pipelines-merge.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
107
108
109
110
111
trigger:
branches:
include:
- main
pr: none
variables:
- group: SerialLoopsPublic
jobs:
- job:
displayName: UI Tests (macOS)
pool:
vmImage: macOS-latest
steps:
- checkout: self
clean: true
- task: DotNetCoreCLI@2
inputs:
command: 'build'
projects: $(Build.SourcesDirectory)/src/SerialLoops.Mac/SerialLoops.Mac.csproj
displayName: Build SerialLoops.Mac
- task: DotNetCoreCLI@2
inputs:
command: 'build'
projects: $(Build.SourcesDirectory)/test/ui/SerialLoops.Mac.Tests/SerialLoops.Mac.Tests.csproj
displayName: Build SerialLoops.Mac.Tests
- pwsh: |
mkdir $env:AGENT_BUILDDIRECTORY/devkitpro
Invoke-WebRequest -Uri $env:DOWNLOAD_URI -OutFile devkitpro.zip
Expand-Archive -Path devkitpro.zip -DestinationPath $env:AGENT_BUILDDIRECTORY/devkitpro
displayName: Bootstrap devkitARM
env:
DOWNLOAD_URI: $(DevkitARMUri)
- script: |
export DEVKITARM=$AGENT_BUILDDIRECTORY/devkitpro/devkitARM
npm i -g appium
appium driver install mac2
displayName: Install and Run Appium Driver
- task: DotNetCoreCLI@2
displayName: Run macOS UI tests
inputs:
command: 'test'
projects: $(Build.SourcesDirectory)/test/ui/SerialLoops.Mac.Tests/SerialLoops.Mac.Tests.csproj
env:
APP_LOCATION: "$(Build.SourcesDirectory)/src/SerialLoops.Mac/bin/Debug/net8.0/Serial Loops.app"
PROJECT_NAME: MacUITest
ROM_URI: $(ChokuRomUri)
LOG_FILE: $(Build.ArtifactStagingDirectory)/TestConsole.log
DEVKITARM: $(Agent.BuildDirectory)/devkitpro/devkitARM
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: $(Build.ArtifactStagingDirectory)
ArtifactName: MacTestArtifacts
publishLocation: Container
displayName: Publish macOS Test Artifacts
condition: always()
- job:
displayName: UI Tests (Windows)
pool:
name: LoopyPool
demands:
- Agent.OS -equals Windows_NT
steps:
- checkout: self
clean: true
- pwsh: |
Remove-Item -Path $env:USERPROFILE\SerialLoops\Logs\SerialLoops.log
displayName: Delete SL logs if they exist
continueOnError: true
- task: DotNetCoreCLI@2
inputs:
command: 'build'
projects: $(Build.SourcesDirectory)/src/SerialLoops.Wpf/SerialLoops.Wpf.csproj
displayName: Build SerialLoops.Wpf
- task: DotNetCoreCLI@2
inputs:
command: 'build'
projects: $(Build.SourcesDirectory)/test/ui/SerialLoops.Wpf.Tests/SerialLoops.Wpf.Tests.csproj
displayName: Build SerialLoops.Wpf.Tests
- task: Docker@2
displayName: Pull devkitpro/devkitarm in advance
inputs:
command: pull
arguments: devkitpro/devkitarm
- task: ms-autotest.screen-resolution-utility-task.screen-resolution-utlity-task.ScreenResolutionUtility@1
displayName: 'Set Screen Resolution'
inputs:
displaySettings: specific
width: 2048
height: 1536
- task: VSTest@3
displayName: 'VsTest - Run UI Tests'
inputs:
testAssemblyVer2: |
**\*SerialLoops.Wpf.Tests.dll
!**\obj\**
uiTests: true
env:
APP_LOCATION: $(Build.SourcesDirectory)\src\SerialLoops.Wpf\bin\Debug\net8.0-windows\SerialLoops.exe
PROJECT_NAME: WinUITest
WINAPPDRIVER_LOC: 'C:\Program Files (x86)\Windows Application Driver\WinAppDriver.exe'
ROM_URI: $(ChokuRomUri)
LOG_FILE: $(Build.ArtifactStagingDirectory)/TestConsole.log
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: $(Build.ArtifactStagingDirectory)
ArtifactName: WindowsTestArtifacts
publishLocation: Container
displayName: Publish Windows Test Artifacts
condition: always()