This repository was archived by the owner on Feb 15, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
68 lines (61 loc) · 1.3 KB
/
Copy path.gitlab-ci.yml
File metadata and controls
68 lines (61 loc) · 1.3 KB
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
image: node:latest
# This folder is cached between builds
# http://docs.gitlab.com/ce/ci/yaml/README.html#cache
cache:
paths:
- node_modules/
# Main stages
stages:
- build
- test
- deploy
# Generate documents on every branch.
documents:
stage: build
script:
- npm install --save-dev
- node node_modules/.bin/jsdoc -c ./.jsdoc.conf.json
allow_failure: false
artifacts:
name: plugin-documentation
paths:
- docs/
# Perform full tests. Executed on every other branch but the master branch.
test:
stage: test
script:
- npm install --save-dev
- node ./tests/perform-tests.js
allow_failure: false
except:
- master
# Perform code coverage only on the master & development branches.
coverage:
stage: test
script:
- npm install --save-dev
- node node_modules/.bin/istanbul cover ./tests/perform-tests.js coverage
coverage: '/^Statements *: (\d+\.\d+%)/'
artifacts:
name: plugin-coverage
paths:
- coverage/
allow_failure: false
only:
- master
- development
# Upload the code coverage and documentation reports only on the master branch.
pages:
stage: deploy
dependencies:
- documents
- coverage
script:
- mv docs public/
- mv coverage/lcov-report/ public/coverage
artifacts:
paths:
- public
expire_in: 30 days
only:
- master