forked from IABTechLab/cmp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
77 lines (58 loc) · 834 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
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
stages:
- setup
- unit_test
- build
- deploy
- e2e_test
cache:
paths:
- node_modules/
# setup
setup:
stage: setup
tags:
- HostShell
script:
- npm install
# unit test
unit_test:
stage: unit_test
tags:
- HostShell
script:
- npm run test:unit
# build
build:
stage: build
tags:
- HostShell
script:
- npm run build
artifacts:
paths:
- build
# now deployment
deploy:
stage: deploy
tags:
- HostShell
script:
- rm ~/.now/auth.json
- ./node_modules/.bin/now --token=$NOW_TOKEN
- ./node_modules/.bin/now alias --token=$NOW_TOKEN
dependencies:
- build
only:
- tags
# e2e tests
e2e_test:
stage: e2e_test
tags:
- HostShell
script:
- npm run test:e2e
dependencies:
- build
- deploy
only:
- tags