]> git.r.bdr.sh - rbdr/cologne/blame - .gitlab-ci.yml
Constrain matching regex to only match 255 chars
[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
12
69d55272
RBR
13stages:
14 - lint
15 - test
7ce5b3cb 16 - quality
69d55272
RBR
17
18before_script:
19 - npm install
20
99148335 21cache:
b5f4592d 22 key: ${CI_COMMIT_REF_SLUG}
99148335
RBR
23 paths:
24 - node_modules/
25 - .nyc_output/
bb6ef715 26 - .sonar/cache
99148335 27
69d55272 28lint:
9fabdd32 29 <<: *only-default
69d55272
RBR
30 stage: lint
31 script:
32 - npm run lint
33
34test:
9fabdd32 35 <<: *only-default
69d55272
RBR
36 stage: test
37 script:
38 - npm test
7ce5b3cb
RBR
39
40quality:
59fae9f5
RBR
41 stage: quality
42 needs:
0499d203 43 - test
7ce5b3cb
RBR
44 image:
45 name: sonarsource/sonar-scanner-cli:latest
46 entrypoint: [""]
7ce5b3cb
RBR
47 script:
48 - npm run coverage
49 - sonar-scanner
50 only:
51 - merge_requests
52 - master