Added Sonar config #8
22
.gitea/workflows/sonar.yaml
Normal file
22
.gitea/workflows/sonar.yaml
Normal file
@@ -0,0 +1,22 @@
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened]
|
||||
|
||||
name: SonarQube Scan
|
||||
jobs:
|
||||
sonarqube:
|
||||
name: SonarQube Trigger
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checking out
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
# Disabling shallow clone is recommended for improving relevancy of reporting
|
||||
fetch-depth: 0
|
||||
- name: SonarQube Scan
|
||||
uses: SonarSource/sonarqube-scan-action@v7.0.0 # Ex: v4.1.0 or sha1, See the latest version at https://github.com/marketplace/actions/official-sonarqube-scan
|
||||
env:
|
||||
SONAR_TOKEN: ${{ secrets.SONARQUBE_TOKEN }}
|
||||
19
sonar-project.properties
Normal file
19
sonar-project.properties
Normal file
@@ -0,0 +1,19 @@
|
||||
# must be unique in a given SonarQube instance
|
||||
sonar.projectKey=CptArn-Homepage
|
||||
# this is the name and version displayed in the SonarQube UI. Was mandatory prior to SonarQube 6.1.
|
||||
sonar.projectName=CptArn Homepage
|
||||
sonar.projectVersion=20.x.x
|
||||
# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows.
|
||||
# This property is optional if sonar.modules is set.
|
||||
sonar.sources=src
|
||||
sonar.sourceEncoding=UTF-8
|
||||
sonar.exclusions=**/node_modules/**,**/*.stories.ts,**/*.spec.ts,**/jest.config.js,**/primeng-theme/**
|
||||
sonar.tests=
|
||||
sonar.test.exclusions=
|
||||
sonar.test.inclusions=**/*.spec.ts
|
||||
sonar.typescript.lcov.reportPaths=coverage/libs/base/lcov.info,coverage/libs/utils/lcov.info
|
||||
sonar.typescript.exclusions=**/**e2e/**,**/node_modules/**,**/stories.ts,**/typings.d.ts,**/main.ts,**/index.ts,**/environments/environment*.ts,**/test.ts,**/*module.ts,**/*routing.module.ts,**/*.js
|
||||
#----- Default SonarQube server
|
||||
sonar.host.url=http://10.0.1.245:9005
|
||||
|
||||
|
||||
Reference in New Issue
Block a user