Skip to content

Commit

Permalink
Merge pull request #3 from Endava/develop
Browse files Browse the repository at this point in the history
Merge develop to main
  • Loading branch information
jcendava authored Jun 21, 2024
2 parents fba8a09 + e1901c5 commit 8656eb2
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 15 deletions.
32 changes: 17 additions & 15 deletions .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
# Feel free to take a look at our documentation (https://docs.sonarcloud.io/getting-started/github/)
# or reach out to our community forum if you need some help (https://community.sonarsource.com/c/help/sc/9)

name: SonarCloud analysis
name: SonarCloud Analysis

on:
push:
Expand All @@ -40,28 +40,30 @@ permissions:

jobs:
Analysis:
name: SonarCloud Analysis
runs-on: ubuntu-latest

steps:
- name: Test Coverage
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install dependencies
run: npm install
- name: Test and Coverage
run: npm run coverage
- name: Analyze with SonarCloud

# You can pin the exact commit or the version.
# uses: SonarSource/[email protected]
uses: SonarSource/sonarcloud-github-action@4006f663ecaf1f8093e8e4abb9227f6041f52216
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} # Generate a token on Sonarcloud.io, add it to the secrets of this repo with the name SONAR_TOKEN (Settings > Secrets > Actions > add new repository secret)
with:
# Additional arguments for the SonarScanner CLI
args:
# Unique keys of your project and organization. You can find them in SonarCloud > Information (bottom-left menu)
# mandatory
-Dsonar.projectKey=Endava_awsimporter-impactframework-plugin
-Dsonar.organization=endava
# Comma-separated paths to directories containing main source files.
#-Dsonar.sources= # optional, default is project base directory
# Comma-separated paths to directories containing test source files.
#-Dsonar.tests= # optional. For more info about Code Coverage, please refer to https://docs.sonarcloud.io/enriching/test-coverage/overview/
# Adds more detail to both client and server-side analysis logs, activating DEBUG mode for the scanner, and adding client-side environment variables and system properties to the server-side log of analysis report processing.
#-Dsonar.verbose= # optional, default is false
# When you need the analysis to take place in a directory other than the one from which it was launched, default is .
-Dsonar.scm.provider=git
-Dsonar.sources=src
-Dsonar.tests=src/__tests__
-Dsonar.test.inclusions=src/**/*.test*.ts
-Dsonar.cpd.exclusions=src/__mocks__/*.ts
-Dsonar.javascript.lcov.reportPaths=./coverage/lcov.info
projectBaseDir: .

9 changes: 9 additions & 0 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
sonar.organization=endava
sonar.projectKey=Endava_awsimporter-impactframework-plugin
sonar.projectVersion=1.0.0
sonar.scm.provider=git
sonar.sources=src
sonar.tests=src/__tests__
sonar.test.inclusions=src/**/*.test*.ts
sonar.cpd.exclusions=src/__mocks__/*.ts
sonar.javascript.lcov.reportPaths=./coverage/lcov.info

0 comments on commit 8656eb2

Please sign in to comment.