Skip to content

Commit

Permalink
remove frontend part from sonar workflow as it is causing issues to scan
Browse files Browse the repository at this point in the history
  • Loading branch information
saudkhan116 committed Jan 2, 2023
1 parent 7dff4bd commit 22ddcab
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 16 deletions.
31 changes: 16 additions & 15 deletions .github/workflows/sonar-scan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ jobs:
name: sonarCloud
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [ 16.x ]
# strategy:
# matrix:
# node-version: [ 16.x ]

steps:
- uses: actions/checkout@v3
Expand All @@ -45,19 +45,20 @@ jobs:
cd consumer-backend/materialpass
mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- name: Run npm install
run: npm install --legacy-peer-deps
# cannot scan frontend component in one sonar cloud project where backend is also running, because frontend implemented in different technology
# - name: Use Node.js ${{ matrix.node-version }}
# uses: actions/setup-node@v3
# with:
# node-version: ${{ matrix.node-version }}

# - name: Run npm install
# run: npm install --legacy-peer-deps

- name: Analyze Frontend Code
uses: sonarsource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
# - name: Analyze Frontend Code
# uses: sonarsource/sonarcloud-github-action@master
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}



Expand Down
2 changes: 1 addition & 1 deletion sonar-project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ sonar.javascript.lcov.reportPaths= ./coverage/lcov.info
sonar.coverage.exclusions=src/**/index.js
sonar.java.binaries=**/target/classes
sonar.exclusions=consumer-backend/materialpass/target/**
# sonar.exclusions=consumer-backend/**
#sonar.exclusions=consumer-backend/**
sonar.sourceEncoding=UTF-8

0 comments on commit 22ddcab

Please sign in to comment.