forked from bahmutov/cypress-example-kitchensink
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-ci.yml
40 lines (34 loc) · 1.49 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
34
35
36
37
38
39
40
# if you want to configure triggers for Azure CI see
# https://docs.microsoft.com/en-us/azure/devops/pipelines/build/triggers?view=azure-devops&tabs=yaml#tags
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
pool:
vmImage: 'ubuntu-16.04'
strategy:
parallel: 10
steps:
- task: NodeTool@0
inputs:
versionSpec: '10.x'
displayName: 'Install Node.js'
# Install Node dependencies
# TODO How to cache ~/.npm and ~/.cache folders?
# https://github.com/cypress-io/cypress-example-kitchensink/issues/132
- 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
# environment variable BUILD_BUILDNUMBER is a good candidate
- script: |
npx print-env AGENT
npx print-env BUILD
npx print-env SYSTEM
npm run start:ci:windows &
npx cypress run --record --parallel --ci-build-id $BUILD_BUILDNUMBER --group "Azure CI"
displayName: 'Run Cypress tests'