]> git.r.bdr.sh - rbdr/cologne/blame - .gitlab-ci.yml
Add a License
[rbdr/cologne] / .gitlab-ci.yml
CommitLineData
9fabdd32
RBR
1.only-default: &only-default
2 only:
3 - branches
4 - merge_requests
5 - tags
6 - refs
7
69d55272
RBR
8image: node:14
9
7ce5b3cb
RBR
10variables:
11 SONAR_USER_HOME: "${CI_PROJECT_DIR}/.sonar" # Defines the location of the analysis task cache
c5c1edf7 12 GIT_DEPTH: "0"
7ce5b3cb 13
69d55272
RBR
14stages:
15 - lint
16 - test
7ce5b3cb 17 - quality
69d55272
RBR
18
19before_script:
20 - npm install
21
99148335 22cache:
b5f4592d 23 key: ${CI_COMMIT_REF_SLUG}
99148335
RBR
24 paths:
25 - node_modules/
26 - .nyc_output/
bb6ef715 27 - .sonar/cache
99148335 28
69d55272 29lint:
9fabdd32 30 <<: *only-default
69d55272
RBR
31 stage: lint
32 script:
33 - npm run lint
34
35test:
9fabdd32 36 <<: *only-default
69d55272
RBR
37 stage: test
38 script:
39 - npm test
7ce5b3cb
RBR
40
41quality:
3396d414 42 <<: *only-default
59fae9f5
RBR
43 stage: quality
44 needs:
0499d203 45 - test
7ce5b3cb
RBR
46 image:
47 name: sonarsource/sonar-scanner-cli:latest
48 entrypoint: [""]
7ce5b3cb
RBR
49 script:
50 - npm run coverage
51 - sonar-scanner