-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
56 lines (50 loc) · 1.46 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
trigger:
- main
jobs:
- job: pwcTests
displayName: Playwright Tests - pwc
strategy:
matrix:
chromium-1:
project: chromium
shard: 1/3
chromium-2:
project: chromium
shard: 2/3
chromium-3:
project: chromium
shard: 3/3
pool:
vmImage: ubuntu-latest
# If you choose to not use the playwright container, you will also need to npx install playwright in your steps
container: mcr.microsoft.com/playwright:v1.42.1-jammy
variables:
- name: npm_config_cache
value: $(Pipeline.Workspace)/.npm
# You can use a variable group to store the CURRENTS_RECORD_KEY secret
- group: currents-settings
steps:
- task: NodeTool@0
displayName: 'Install NodeJS'
inputs:
versionSpec: '18'
# Speed up the execution by caching the dependencies
# https://docs.microsoft.com/en-us/azure/devops/pipelines/caching/?view=azure-devops
- task: Cache@2
inputs:
key: 'npm | "$(Agent.OS)" | package-lock.json'
restoreKeys: |
npm | "$(Agent.OS)"
path: $(npm_config_cache)
displayName: Cache npm
# Install Node dependencies
- script: npm ci
displayName: 'Install Dependencies'
# Use pwc as the currents wrapper for playwright test
- script: npx pwc --shard=$(shard)
workingDirectory: '$(build.sourcesdirectory)/basic'
displayName: 'Run Basic Tests'
env:
CI: 'true'
CURRENTS_PROJECT_ID: '3W3DU4'
CURRENTS_RECORD_KEY: $(CURRENTS_RECORD_KEY)