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