-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (37 loc) · 1.04 KB
/
sonar.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
on:
workflow_dispatch:
push:
branches:
- main
- feature/*
pull_request:
types: [opened, synchronize, reopened]
name: Main Workflow
jobs:
sonarcloud:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
# Disabling shallow clone is recommended for improving relevancy of reporting
fetch-depth: 0
- name: Run tests
run: |
npm ci
npm run test
echo "${{ github.ref_name }}"
- name: SonarCloud Scan
uses: sonarsource/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
args: >
-Dsonar.organization=retejs
-Dsonar.projectKey=retejs_${{ github.event.repository.name }}
-Dsonar.sources=src/
-Dsonar.test.exclusions=tests/**
-Dsonar.javascript.lcov.reportPaths=coverage/lcov.info
-Dsonar.tests=tests/
-Dsonar.branch.name=${{ github.ref_name }}
-Dsonar.verbose=true