]> git.r.bdr.sh - rbdr/cologne/blame - .gitlab-ci.yml
Merge branch 'rbdr-address-sonarqube-issues' into 'master'
[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
12
2a9da17f
RBR
13stages:
14 - lint
15 - test
56cee367 16 - quality
2a9da17f
RBR
17
18before_script:
19 - npm install
20
b9c7f5bf 21cache:
827c56a9 22 key: ${CI_COMMIT_REF_SLUG}
b9c7f5bf
RBR
23 paths:
24 - node_modules/
25 - .nyc_output/
d959613c 26 - .sonar/cache
b9c7f5bf 27
2a9da17f 28lint:
6a4e7000 29 <<: *only-default
2a9da17f
RBR
30 stage: lint
31 script:
32 - npm run lint
33
34test:
6a4e7000 35 <<: *only-default
2a9da17f
RBR
36 stage: test
37 script:
38 - npm test
56cee367
RBR
39
40quality:
a3486315 41 <<: *only-default
b8778db9
RBR
42 stage: quality
43 needs:
238047e1 44 - test
56cee367
RBR
45 image:
46 name: sonarsource/sonar-scanner-cli:latest
47 entrypoint: [""]
56cee367
RBR
48 script:
49 - npm run coverage
50 - sonar-scanner