Skip to content

Commit

Permalink
chore(sonar): coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
fernandatoledo committed Jul 25, 2024
1 parent 4221e2f commit d04f919
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions .github/workflows/sonar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ on:

env:
SONAR_PROJECT: myapp-delete
SONAR_URL: ${{ secrets.SONAR_URL }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

jobs:
sonar:
Expand All @@ -28,22 +26,24 @@ jobs:
- name: 📦 Setup Node + PNPM + install deps
uses: ./.github/actions/setup-node-pnpm-install

- name: Run Tests
run: export NODE_OPTIONS=--experimental-vm-modules && yarn test --coverage

- name: SonarQube Scan
uses: sonarsource/sonarqube-scan-action@master

- name: Run Sonarqube analysis
run: |
sonar-scanner \
-Dsonar.qualitygate.wait=true \
-Dsonar.host.url=$SONAR_URL \
-Dsonar.token=$SONAR_TOKEN \
-Dsonar.projectKey=$SONAR_PROJECT \
-Dsonar.scm.provider=git \
-Dsonar.java.binaries=/tmp \
-Dsonar.nodejs.executable=$(which node) \
-Dsonar.projectVersion=$(echo $GITHUB_SHA | cut -c1-8) \
-Dsonar.sonar.sourceEncoding=UTF-8 \
-Dsonar.sonar.sources=. \
-Dsonar.projectBaseDir=. \
-Dsonar.javascript.lcov.reportPaths=coverage/lcov.info \
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_URL }}
with:
args: >
-Dsonar.qualitygate.wait=true
-Dsonar.projectKey=$SONAR_PROJECT
-Dsonar.scm.provider=git
-Dsonar.java.binaries=/tmp
-Dsonar.nodejs.executable=$(which node)
-Dsonar.projectVersion=$(echo $GITHUB_SHA | cut -c1-8)
-Dsonar.sonar.sourceEncoding=UTF-8
-Dsonar.sonar.sources=.
-Dsonar.projectBaseDir=.
-Dsonar.javascript.lcov.reportPaths=coverage/lcov.info
-Dsonar.coverage.exclusions=**/scripts/**,**/network/**,**/storage/**,**/**.config.js,**/rnb-cli/**,**/rnbv.js,**/android/**,**/**.styles.ts,**/tests/**,**/provider/**,**/__mocks__/**,**/__tests__/**,**/httpClient/**,**/queryClient/index.ts,**/hooks/*,**/jest-setup.js,**/azureClient/**,**/context/Theme/**,**/constants/**,**/hooks/useRootNavigation.ts,**/assets/**,**/locale/**,**/test.tsx,**/*.test.tsx

0 comments on commit d04f919

Please sign in to comment.