]> git.r.bdr.sh - rbdr/cologne/blame_incremental - .gitlab-ci.yml
Cache the nyc_output dir
[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
21lint:
22 <<: *only-default
23 stage: lint
24 script:
25 - npm run lint
26
27test:
28 <<: *only-default
29 stage: test
30 cache:
31 paths:
32 - .nyc_output/
33 script:
34 - npm test
35
36quality:
37 stage: quality
38 needs:
39 -test
40 image:
41 name: sonarsource/sonar-scanner-cli:latest
42 entrypoint: [""]
43 cache:
44 key: "${CI_JOB_NAME}"
45 paths:
46 - .sonar/cache
47 script:
48 - npm run coverage
49 - sonar-scanner
50 only:
51 - merge_requests
52 - master