forked from cypress-io/cypress-example-kitchensink
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-ci.yml
33 lines (27 loc) · 1.27 KB
/
azure-ci.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
jobs:
# Example job that runs end-to-end tests using Cypress test runner
# https://www.cypress.io/
# Job names can contain alphanumeric characters and '_', cannot start with a number
- job: Cypress_e2e_tests
steps:
- task: NodeTool@0
inputs:
versionSpec: '10.x'
displayName: 'Install Node.js'
# if running this job on Windows, nothing else to install
# if running this job on Linux container
# then we would need to install a single dependency on an agent
# https://on.cypress.io/continuous-integration#Dependencies
- script: apt-get update && apt-get install -y libgconf-2-4
displayName: 'install dependencies'
# Install Node dependencies
# TODO How to cache ~/.npm and ~/.cache folders?
- script: npm ci
displayName: 'Install NPM dependencies'
- script: npm run cy:verify
displayName: 'Cypress verify'
# The next command starts the server and runs Cypress end-to-end tests against it.
# The test artifacts (video, screenshots, test output) will be uploaded to Cypress dashboard
# To record on Cypress dashboard we need to set CYPRESS_RECORD_KEY environment variable
- script: npm run test:ci:record
displayName: 'Run Cypress tests'