-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
40 lines (36 loc) · 1.17 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
# This will run the Windows app tests in Microsoft Azure
# After the test run, it will publish the screenshot taken at the end of the test run
# You can download this from the build artifacts published for the pipeline run
trigger:
- main
parameters:
- name: viewport_size
type: string
default: min
values:
- min
- max
jobs:
- job: Run_Playwright_Tests
pool:
vmImage: "windows-latest"
steps:
- task: Bash@3
displayName: Install Dependencies & Execute Playwright Tests
inputs:
targetType: 'inline'
script: |
# Show the variables before running tests
viewport_size=${{ parameters.viewport_size }}
test_name="$(test_name)"
echo "VIEWPORT_SIZE=$viewport_size"
echo "TEST_NAME=$test_name"
npm install -g node-gyp
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 npm ci
VIEWPORT_SIZE=$viewport_size npm test tests/$test_name
- task: PublishBuildArtifacts@1
condition: succeededOrFailed()
inputs:
PathtoPublish: './screenshots/'
ArtifactName: 'screenshots'
publishLocation: 'Container'