-
Notifications
You must be signed in to change notification settings - Fork 10
61 lines (52 loc) · 1.7 KB
/
sonar-cloud.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
name: Sonar
on:
push:
branches:
- "main"
pull_request:
types: [opened, synchronize, reopened]
jobs:
analyze:
name: Analyze
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
node: [20]
steps:
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- name: Checkout Repo
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
with:
# Disabling shallow clone is recommended for improving relevancy of reporting
fetch-depth: 0
- name: cache node_modules
uses: actions/cache@v4
id: cache
with:
path: |
node_modules
~/.cache/ms-playwright/
~\AppData\Local\ms-playwright\
key: ${{ matrix.os }}-node-v${{ matrix.node }}-deps-${{ hashFiles(format('{0}{1}', github.workspace, '/package-lock.json')) }}
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: npm ci
- name: Lint (Report Generate)
run: npm run lint:report
- name: get-npm-version
id: package-version
uses: martinbeentjes/npm-get-version-action@main
- name: SonarCloud Scan
uses: sonarsource/sonarcloud-github-action@master
with:
args: >
-Dsonar.organization=grabarzundpartner
-Dsonar.projectKey=GrabarzUndPartner_nuxt-custom-elements
-Dsonar.eslint.reportPaths=eslint-report.json
-Dsonar.projectVersion=${{ steps.package-version.outputs.current-version}}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}