forked from ncatestify/cypress-magento-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
49 lines (41 loc) · 823 Bytes
/
.gitlab-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
41
42
43
44
45
46
47
48
image: cypress/base:16
stages:
- test
variables:
npm_config_cache: '$CI_PROJECT_DIR/.npm'
CYPRESS_CACHE_FOLDER: '$CI_PROJECT_DIR/cache/Cypress'
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- .cache/*
- cache/Cypress
- node_modules
- build
test_on_main:
stage: test
script:
- npm ci
- npx cypress run --record
rules:
- if: '$CI_PIPELINE_SOURCE == "schedule" && $CI_COMMIT_BRANCH == "main"'
tags:
- docker1
test_on_other_branches:
stage: test
script:
- npm ci
- npx cypress run
rules:
- if: '$CI_COMMIT_BRANCH != "main"'
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
tags:
- docker1
downstream_test:
stage: test
script:
- npm ci
- npx cypress run
rules:
- if: '$CI_PIPELINE_SOURCE == "pipeline"'
tags:
- docker1