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