-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
54 lines (48 loc) · 1.06 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
image: node:latest
stages:
- build
- test
- deploy
cache:
paths:
- node_modules/
install_dependencies:
stage: build
script:
- npm install -g gulp nyc parcel-bundler@^1.12.4
- npm install
artifacts:
paths:
- node_modules/
testing:
stage: test
script:
- npx nyc gulp test
- npx nyc report --reporter=html
- npx rimraf public && npx parcel build ./src/index.pug --no-content-hash --no-minify -d ./public --public-url ./ --no-cache && node parcel-postbuild.js
artifacts:
paths:
- public
- coverage
- .nyc_output
merge_test:
stage: test
script:
- npx nyc gulp test
- npx nyc report --reporter=html
- npx rimraf public && npx parcel build ./src/index.pug --no-content-hash --no-minify -d ./public --public-url ./ --no-cache && node parcel-postbuild.js
artifacts:
only:
- merge_requests
pages:
stage: deploy
script:
- mkdir .public
- cp -r * .public
- mv .public public
- mv coverage/ public/coverage/
artifacts:
paths:
- public
only:
- master