]> git.r.bdr.sh - rbdr/cologne/blame - .gitlab-ci.yml
Set git depth to 0
[rbdr/cologne] / .gitlab-ci.yml
CommitLineData
6a4e7000
RBR
1.only-default: &only-default
2 only:
3 - branches
4 - merge_requests
5 - tags
6 - refs
7
2a9da17f
RBR
8image: node:14
9
56cee367
RBR
10variables:
11 SONAR_USER_HOME: "${CI_PROJECT_DIR}/.sonar" # Defines the location of the analysis task cache
b6156ed0 12 GIT_DEPTH: "0"
56cee367 13
2a9da17f
RBR
14stages:
15 - lint
16 - test
56cee367 17 - quality
2a9da17f
RBR
18
19before_script:
20 - npm install
21
b9c7f5bf 22cache:
827c56a9 23 key: ${CI_COMMIT_REF_SLUG}
b9c7f5bf
RBR
24 paths:
25 - node_modules/
26 - .nyc_output/
d959613c 27 - .sonar/cache
b9c7f5bf 28
2a9da17f 29lint:
6a4e7000 30 <<: *only-default
2a9da17f
RBR
31 stage: lint
32 script:
33 - npm run lint
34
35test:
6a4e7000 36 <<: *only-default
2a9da17f
RBR
37 stage: test
38 script:
39 - npm test
56cee367
RBR
40
41quality:
a3486315 42 <<: *only-default
b8778db9
RBR
43 stage: quality
44 needs:
238047e1 45 - test
56cee367
RBR
46 image:
47 name: sonarsource/sonar-scanner-cli:latest
48 entrypoint: [""]
56cee367
RBR
49 script:
50 - npm run coverage
51 - sonar-scanner