Skip to content

Commit 8656eb2

Browse files
authored
Merge pull request #3 from Endava/develop
Merge develop to main
2 parents fba8a09 + e1901c5 commit 8656eb2

File tree

2 files changed

+26
-15
lines changed

2 files changed

+26
-15
lines changed

.github/workflows/sonarcloud.yml

+17-15
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
# Feel free to take a look at our documentation (https://docs.sonarcloud.io/getting-started/github/)
2727
# or reach out to our community forum if you need some help (https://community.sonarsource.com/c/help/sc/9)
2828

29-
name: SonarCloud analysis
29+
name: SonarCloud Analysis
3030

3131
on:
3232
push:
@@ -40,28 +40,30 @@ permissions:
4040

4141
jobs:
4242
Analysis:
43+
name: SonarCloud Analysis
4344
runs-on: ubuntu-latest
44-
4545
steps:
46+
- name: Test Coverage
47+
uses: actions/checkout@v4
48+
with:
49+
fetch-depth: 0
50+
- name: Install dependencies
51+
run: npm install
52+
- name: Test and Coverage
53+
run: npm run coverage
4654
- name: Analyze with SonarCloud
47-
48-
# You can pin the exact commit or the version.
49-
# uses: SonarSource/[email protected]
5055
uses: SonarSource/sonarcloud-github-action@4006f663ecaf1f8093e8e4abb9227f6041f52216
5156
env:
5257
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)
5358
with:
54-
# Additional arguments for the SonarScanner CLI
5559
args:
56-
# Unique keys of your project and organization. You can find them in SonarCloud > Information (bottom-left menu)
57-
# mandatory
5860
-Dsonar.projectKey=Endava_awsimporter-impactframework-plugin
5961
-Dsonar.organization=endava
60-
# Comma-separated paths to directories containing main source files.
61-
#-Dsonar.sources= # optional, default is project base directory
62-
# Comma-separated paths to directories containing test source files.
63-
#-Dsonar.tests= # optional. For more info about Code Coverage, please refer to https://docs.sonarcloud.io/enriching/test-coverage/overview/
64-
# 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.
65-
#-Dsonar.verbose= # optional, default is false
66-
# When you need the analysis to take place in a directory other than the one from which it was launched, default is .
62+
-Dsonar.scm.provider=git
63+
-Dsonar.sources=src
64+
-Dsonar.tests=src/__tests__
65+
-Dsonar.test.inclusions=src/**/*.test*.ts
66+
-Dsonar.cpd.exclusions=src/__mocks__/*.ts
67+
-Dsonar.javascript.lcov.reportPaths=./coverage/lcov.info
6768
projectBaseDir: .
69+

sonar-project.properties

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
sonar.organization=endava
2+
sonar.projectKey=Endava_awsimporter-impactframework-plugin
3+
sonar.projectVersion=1.0.0
4+
sonar.scm.provider=git
5+
sonar.sources=src
6+
sonar.tests=src/__tests__
7+
sonar.test.inclusions=src/**/*.test*.ts
8+
sonar.cpd.exclusions=src/__mocks__/*.ts
9+
sonar.javascript.lcov.reportPaths=./coverage/lcov.info

0 commit comments

Comments
 (0)