-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.gitlab-ci.yml
68 lines (63 loc) · 1.22 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
stages:
- lint
- analyze
analyze:unit:
stage: analyze
image:
name: node:18-alpine3.16
cache:
key: '${CI_JOB_NAME}'
paths:
- .pnpm-store
before_script:
- npm install -g pnpm
- pnpm config set store-dir .pnpm-store
script:
- pnpm install --no-frozen-lockfile
- pnpm coverage
allow_failure: true
interruptible: true
artifacts:
name: "test-cov"
expire_in: 3 hrs
paths:
- /coverage
- .pnpm-store
only:
- main
tags:
- gits-docker
# stage sonarqube
analyze:sonar:
stage: analyze
image:
name: sonarsource/sonar-scanner-cli:5.0.0
entrypoint: [ '' ]
needs: ["analyze:unit"]
cache:
key: '${CI_JOB_NAME}'
paths:
- .sonar/cache
script:
- sonar-scanner -Dsonar.host.url=https://sonar.gits.id -Dsonar.login=$SONAR_USER -Dsonar.password=$SONAR_PASSWORD
interruptible: true
allow_failure: true
dependencies:
- analyze:unit
only:
- main
tags:
- gits-docker
lint:
stage: lint
image:
name: node:18-alpine3.16
before_script:
- npm install -g pnpm
- pnpm config set store-dir .pnpm-store
script:
- pnpm install --no-frozen-lockfile
- pnpm lint
only:
# - main
- merge_requests