Skip to content

Commit

Permalink
SBVT-2310: Adding SonarQube (#236)
Browse files Browse the repository at this point in the history
* SBVT-2310: adding sonar

* SBVT-2310: adding sonar

* SBVT-2310: modifying sonar

* SBVT-2310: modifying sonar

* SBVT-2310: modifying sonar
  • Loading branch information
tnelms1 authored Feb 9, 2024
1 parent 47dab92 commit 9d31f37
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/sonar-qube.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Run SonarQube Analysis

on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened]

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- uses: sonarsource/sonarqube-scan-action@master
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
# If you wish to fail your job when the Quality Gate is red, uncomment the
# following lines. This would typically be used to fail a deployment.
# We do not recommend to use this in a pull request. Prefer using pull request
# decoration instead.
# - uses: sonarsource/sonarqube-quality-gate-action@master
# timeout-minutes: 5
# env:
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}_URL: ${{ vars.SONAR_HOST_URL }}
13 changes: 13 additions & 0 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
sonar.projectKey=visualtest-cypress

# relative paths to source directories. More details and properties are described
# in https://docs.sonarqube.org/latest/project-administration/narrowing-the-focus/
; sonar.sources=

; sonar.exclusions=**/*.spec.js
sonar.test.inclusions=/test

; sonar.javascript.lcov.reportPaths=coverage/lcov.info
; sonar.typescript.tsconfigPath=tsconfig.json

sonar.sourceEncoding=UTF-8

0 comments on commit 9d31f37

Please sign in to comment.