]>
Commit | Line | Data |
---|---|---|
6a4e7000 RBR |
1 | .only-default: &only-default |
2 | only: | |
3 | - branches | |
4 | - merge_requests | |
5 | - tags | |
6 | - refs | |
7 | ||
2a9da17f RBR |
8 | image: node:14 |
9 | ||
56cee367 RBR |
10 | variables: |
11 | SONAR_USER_HOME: "${CI_PROJECT_DIR}/.sonar" # Defines the location of the analysis task cache | |
12 | ||
2a9da17f RBR |
13 | stages: |
14 | - lint | |
15 | - test | |
56cee367 | 16 | - quality |
2a9da17f RBR |
17 | |
18 | before_script: | |
19 | - npm install | |
20 | ||
21 | lint: | |
6a4e7000 | 22 | <<: *only-default |
2a9da17f RBR |
23 | stage: lint |
24 | script: | |
25 | - npm run lint | |
26 | ||
27 | test: | |
6a4e7000 | 28 | <<: *only-default |
2a9da17f RBR |
29 | stage: test |
30 | script: | |
31 | - npm test | |
56cee367 RBR |
32 | |
33 | quality: | |
29378aea RBR |
34 | stage: "quality" |
35 | needs: ["test"] | |
56cee367 RBR |
36 | image: |
37 | name: sonarsource/sonar-scanner-cli:latest | |
38 | entrypoint: [""] | |
39 | cache: | |
40 | key: "${CI_JOB_NAME}" | |
41 | paths: | |
42 | - .sonar/cache | |
43 | script: | |
44 | - npm run coverage | |
45 | - sonar-scanner | |
46 | only: | |
47 | - merge_requests | |
48 | - master |