-
Notifications
You must be signed in to change notification settings - Fork 2
/
.gitlab-ci.yml
82 lines (72 loc) · 1.81 KB
/
.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
image: node:12.16.3-alpine3.11
variables:
CYPRESS_CACHE_FOLDER: "cache/Cypress"
before_script:
- apk add git
- git fetch --no-tags --progress $CI_REPOSITORY_URL +refs/heads/master:refs/master
stages:
- setup
- distributed-tasks
install:deps:
cache:
key:
files:
- yarn.lock
paths:
- node_modules
- cache/Cypress
- .yarn
policy: pull-push
stage: setup
interruptible: true
script:
- yarn install --pure-lockfile --cache-folder .yarn
artifacts:
paths:
- node_modules
- cache/Cypress
.distributed:
stage: distributed-tasks
interruptible: true
artifacts:
paths:
- node_modules/.cache/nx
format:
extends: .distributed
script:
- CI_BASE_SHA=$([[ "$CI_COMMIT_REF_SLUG" == "master" ]] && echo "master~1" || echo "master")
- yarn format:check --base=$CI_BASE_SHA
lint:
extends: .distributed
parallel: 8
script:
- node ./tools/scripts/run-many.js lint $CI_NODE_INDEX $CI_NODE_TOTAL $CI_COMMIT_REF_SLUG
test:
extends: .distributed
parallel: 8
script:
- node ./tools/scripts/run-many.js test $CI_NODE_INDEX $CI_NODE_TOTAL $CI_COMMIT_REF_SLUG --parallel
e2e:
extends: .distributed
parallel: 2
image: cypress/base:12.16.2
allow_failure: true
before_script:
- apt-get install git
- git fetch --no-tags --progress $CI_REPOSITORY_URL +refs/heads/master:refs/master
script:
- node ./tools/scripts/run-many.js e2e $CI_NODE_INDEX $CI_NODE_TOTAL $CI_COMMIT_REF_SLUG
artifacts:
paths:
- node_modules/.cache/nx
- dist/cypress/**/*.mp4
- dist/cypress/**/*.png
build:
extends: .distributed
parallel: 2
script:
- node ./tools/scripts/run-many.js build $CI_NODE_INDEX $CI_NODE_TOTAL $CI_COMMIT_REF_SLUG --prod
artifacts:
paths:
- node_modules/.cache/nx
- dist