diff --git a/.github/workflows/backend-ci.yaml b/.github/workflows/backend-ci.yaml
index cedb6fb6..7f896a50 100644
--- a/.github/workflows/backend-ci.yaml
+++ b/.github/workflows/backend-ci.yaml
@@ -64,6 +64,28 @@ jobs:
cd ${{ env.RESC_BACKEND_DIR }}
tox -e lint
+ - name: SonarCloud Scan
+ uses: SonarSource/sonarcloud-github-action@master
+ with:
+ projectBaseDir: ${{ env.RESC_BACKEND_DIR }}
+ args: >
+ -Dsonar.organization=abnamro-resc
+ -Dsonar.projectKey=abnamro-resc_resc-backend
+ -Dsonar.python.coverage.reportPaths=coverage.xml
+ -Dsonar.sourceEncoding=UTF-8
+ -Dsonar.projectName=resc-backend
+ -Dsonar.groupid=resc
+ -Dsonar.sources=src/
+ -Dsonar.inclusions=**/*.py
+ -Dsonar.exclusions=**/*yml,**/*.xml,**/*.txt,**/*.html,**/*.js
+ -Dsonar.tests=tests/
+ -Dsonar.cpd.exclusions=**/*yml,**/*.xml,**/*.txt,**/*.html,**/*.js
+ -Dsonar.coverage.exclusions=**/*yml,**/*.xml,**/*.txt,**/*.html,**/*.js
+ -Dsonar.pdf.skip=true
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
+ SONAR_TOKEN: ${{ secrets.__SONAR_TOKEN_BACKEND__ }}
+
- name: Get Branch Name
id: extract_branch
run: |
diff --git a/.github/workflows/frontend-ci.yaml b/.github/workflows/frontend-ci.yaml
index b002711e..d500d910 100644
--- a/.github/workflows/frontend-ci.yaml
+++ b/.github/workflows/frontend-ci.yaml
@@ -65,6 +65,44 @@ jobs:
cd ${{ env.RESC_FRONTEND_DIR }}
npx auditjs@latest ossi -q || true
+ - name: Running Jest and Coverage
+ run: |
+ cd ${{ env.RESC_FRONTEND_DIR }}
+ yarn jest --coverage || true
+ npm install jest-sonar-reporter --save-dev
+
+ ## Removing the dir paths and making them relative paths.
+ - name: Fix coverage report
+ run: |
+ cd ${{ env.RESC_FRONTEND_DIR }}
+ sed -i "s+/home/runner/work/repository-scanner/repository-scanner/components/resc-frontend/++g" tests/unit/reports/coverage/lcov.info
+ cat tests/unit/reports/coverage/lcov.info
+
+ - name: SonarCloud Scan
+ uses: SonarSource/sonarcloud-github-action@master
+ with:
+ projectBaseDir: ${{ env.RESC_FRONTEND_DIR }}
+ args: >
+ -Dsonar.organization=abnamro-resc
+ -Dsonar.projectKey=abnamro-resc_resc-frontend
+ -Dsonar.sourceEncoding=UTF-8
+ -Dsonar.projectName=resc-frontend
+ -Dsonar.groupid=resc
+ -Dsonar.sources=src/
+ -Dsonar.inclusions=**/*
+ -Dsonar.exclusions=**/__mocks__/*
+ -Dsonar.tests=tests/
+ -Dsonar.cpd.exclusions=**/*.example.js,**/*.spec.js,**/*.?spec.js
+ -Dsonar.coverage.exclusions=**/*.html,**/*.json,**/*.spec.js,**/*.?spec.js,**/main.*,**/i18n.js,**/router/index.js,**/configuration/*.js
+ -Dsonar.javascript.jstest.reportsPath=tests/unit/reports/coverage
+ -Dsonar.javascript.lcov.reportPaths=tests/unit/reports/coverage/lcov.info
+ -Dsonar.pdf.skip=true
+ -Dsonar.branch.target=*
+ -Dsonar.branch.name=*
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
+ SONAR_TOKEN: ${{ secrets.__SONAR_TOKEN_BACKEND__ }}
+
- id: getversion
name: Get package version
run: |
diff --git a/.github/workflows/vcs-scanner-ci.yaml b/.github/workflows/vcs-scanner-ci.yaml
index e92843bf..2d71b543 100644
--- a/.github/workflows/vcs-scanner-ci.yaml
+++ b/.github/workflows/vcs-scanner-ci.yaml
@@ -65,6 +65,28 @@ jobs:
cd ${{ env.RESC_VCS_SCANNER_DIR }}
tox -e lint
+ - name: SonarCloud Scan
+ uses: SonarSource/sonarcloud-github-action@master
+ with:
+ projectBaseDir: ${{ env.RESC_VCS_SCANNER_DIR }}
+ args: >
+ -Dsonar.organization=abnamro-resc
+ -Dsonar.projectKey=abnamro-resc_resc-vcs-scanner
+ -Dsonar.python.coverage.reportPaths=coverage.xml
+ -Dsonar.sourceEncoding=UTF-8
+ -Dsonar.projectName=resc-vcs-scanner
+ -Dsonar.groupid=resc
+ -Dsonar.sources=src/
+ -Dsonar.inclusions=**/*.py
+ -Dsonar.exclusions=**/*yml,**/*.xml,**/*.txt,**/*.html,**/*.js
+ -Dsonar.tests=tests/
+ -Dsonar.cpd.exclusions=**/*yml,**/*.xml,**/*.txt,**/*.html,**/*.js
+ -Dsonar.coverage.exclusions=**/*yml,**/*.xml,**/*.txt,**/*.html,**/*.js
+ -Dsonar.pdf.skip=true
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
+ SONAR_TOKEN: ${{ secrets.__SONAR_TOKEN_BACKEND__ }}
+
- name: Get Branch Name
id: extract_branch
run: |
diff --git a/.github/workflows/vcs-scraper-ci.yaml b/.github/workflows/vcs-scraper-ci.yaml
index ffc37b09..194a679d 100644
--- a/.github/workflows/vcs-scraper-ci.yaml
+++ b/.github/workflows/vcs-scraper-ci.yaml
@@ -64,6 +64,28 @@ jobs:
cd ${{ env.RESC_VCS_SCRAPER_DIR }}
tox -e lint
+ - name: SonarCloud Scan
+ uses: SonarSource/sonarcloud-github-action@master
+ with:
+ projectBaseDir: ${{ env.RESC_VCS_SCRAPER_DIR }}
+ args: >
+ -Dsonar.organization=abnamro-resc
+ -Dsonar.projectKey=abnamro-resc_resc-vcs-scraper
+ -Dsonar.python.coverage.reportPaths=coverage.xml
+ -Dsonar.sourceEncoding=UTF-8
+ -Dsonar.projectName=resc-vcs-scraper
+ -Dsonar.groupid=resc
+ -Dsonar.sources=src/
+ -Dsonar.inclusions=**/*.py
+ -Dsonar.exclusions=**/*yml,**/*.xml,**/*.txt,**/*.html,**/*.js
+ -Dsonar.tests=tests/
+ -Dsonar.cpd.exclusions=**/*yml,**/*.xml,**/*.txt,**/*.html,**/*.js
+ -Dsonar.coverage.exclusions=**/*yml,**/*.xml,**/*.txt,**/*.html,**/*.js
+ -Dsonar.pdf.skip=true
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
+ SONAR_TOKEN: ${{ secrets.__SONAR_TOKEN_BACKEND__ }}
+
- name: Get Branch Name
id: extract_branch
run: |
diff --git a/README.md b/README.md
index 0ca835b9..f5f9d460 100644
--- a/README.md
+++ b/README.md
@@ -35,6 +35,9 @@
+
+
+
diff --git a/components/resc-backend/README.md b/components/resc-backend/README.md
index f44a5b1d..fa492836 100644
--- a/components/resc-backend/README.md
+++ b/components/resc-backend/README.md
@@ -1,7 +1,10 @@
# Repository Scanner Backend (RESC-Backend)