-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathazure-pipelines.yml
56 lines (48 loc) · 1.33 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
# Node.js
# Build a general Node.js project with npm.
# Add steps that analyze code, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/javascript
trigger:
- main
pool:
vmImage: 'ubuntu-latest'
steps:
- task: NodeTool@0
inputs:
versionSpec: '18.x'
displayName: 'Install Node.js'
# - task: CmdLine@2
# displayName: 'Install sauceCtl'
# inputs:
# script: |
# sudo sh -c 'curl -L https://saucelabs.github.io/saucectl/install | bash -s -- -b /usr/local/bin'
# saucectl --version
- task: CmdLine@2
displayName: 'Install sauceCtl'
inputs:
script: |
npm install -g saucectl
saucectl --version
- task: CmdLine@2
displayName: 'Install Dependencies'
inputs:
script: |
npm install
- task: CmdLine@2
displayName: 'Install testcafe (not needed when run on Sauce)'
inputs:
script: |
npm install -g testcafe
testcafe --version
- task: CmdLine@2
displayName: 'run TestCafe tests on SauceLabs cloud'
inputs:
script: |
saucectl run --config ./.sauce/config-ex2.yml
env:
SAUCE_USERNAME: $(sauceUsername) #this will store the value from 'sauceUsername' into SAUCE_USERNAME
SAUCE_ACCESS_KEY: $(sauceKey)
- task: PublishTestResults@2
inputs:
testResultsFiles: '**/report.xml'
testResultsFormat: 'JUnit'