-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
93 lines (80 loc) · 2.4 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
variables:
buildConfiguration: 'Release'
isRemote: true
trigger:
- master
pool:
vmImage: 'windows-latest'
steps:
- task: SonarCloudPrepare@1
displayName: 'Prepare SonarCloud analysis'
inputs:
SonarCloud: 'SonarCloud'
organization: 'aqualityautomation'
projectKey: 'aquality-automation_aquality-winappdriver-dotnet-template'
projectName: 'aquality-winappdriver-dotnet-template'
projectVersion: '$(Build.BuildNumber)'
extraProperties: |
sonar.coverage.exclusions=**/**
- task: DotNetCoreCLI@2
displayName: 'Build solution'
env:
MSBUILDSINGLELOADCONTEXT: 1 # https://github.com/SpecFlowOSS/SpecFlow/issues/1912
inputs:
command: 'build'
projects: Aquality.WinAppDriver.Template/Aquality.WinAppDriver.Template.sln
arguments: -c $(buildConfiguration)
- task: SonarCloudAnalyze@1
displayName: 'Run SonarCloud code analysis'
continueOnError: true
- task: SonarCloudPublish@1
displayName: 'Publish SonarCloud quality gate results'
continueOnError: true
- task: ScreenResolutionUtility@1
displayName: 'Set up screen resolution 1920x1080'
inputs:
displaySettings: 'specific'
width: '1920'
height: '1080'
- task: NodeTool@0
displayName: 'Install Node.js'
inputs:
versionSpec: '20.x'
- task: CmdLine@2
displayName: 'Install Appium'
inputs:
script: |
echo "Installing Appium"
npm install -g appium@next
appium --version
echo "Appium installed"
- task: CmdLine@2
displayName: 'Install and Run Appium doctor'
inputs:
script: |
echo "Installing and Running Appium doctor"
npm install -g [email protected]
npm install -g [email protected]
appium-doctor
echo "Appium doctor installed and executed"
- task: CmdLine@2
displayName: 'Install Appium Windows Driver'
inputs:
script: |
echo "Installing Appium Windows Driver"
appium driver install --source=npm appium-windows-driver
appium driver list
echo "Appium Windows Driver installed"
- task: CmdLine@2
displayName: 'Start Appium server'
inputs:
script: |
start cmd.exe @cmd /k "appium"
echo "Appium server started"
- task: DotNetCoreCLI@2
displayName: 'Run tests'
inputs:
command: 'test'
projects: '**/Aquality.WinAppDriver.Template.SpecFlow.csproj'
arguments: -c $(buildConfiguration) --no-build
publishTestResults: true