-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.gitlab-ci.yml
74 lines (63 loc) · 1.28 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
image: registry.gitlab.com/particle4dev/build-images:docker-17.07.0-nodejs-8.5.0
# Predefined scopes
.default-cache: &default-cache
key: "node_modules"
paths:
- node_modules/
- .yarn-cache/
- dist/
.push-cache: &push-cache
cache:
<<: *default-cache
policy: push
.pull-cache: &pull-cache
cache:
<<: *default-cache
policy: pull
.docker: &docker
services:
- docker:dind
variables:
DOCKER_DRIVER: overlay
DOCKER_HOST: tcp://docker:2375
tags:
- docker
stages:
- prepare
- test
- publish
before_script:
- chmod +x -R bin/ && for f in bin/utils/*; do source $f; done
prepare:
cache:
<<: *default-cache
stage: prepare
script:
- node --version
- yarn install --frozen-lockfile --cache-folder .yarn-cache
test:
<<: *pull-cache
stage: test
script:
- echo "npm run test:coverage"
artifacts:
paths: [coverage]
expire_in: 3d
lint:
<<: *pull-cache
stage: test
script:
- echo "npm run lint:codeframe"
artifacts:
paths: [coverage]
expire_in: 3d
# deploy_patch:
# <<: *pull-cache
# stage: publish
# script:
# - git config --global user.name 'namhoang'
# - git config --global user.email '[email protected]'
# - npm run deploy:patch
# when: manual
# only:
# - develop