Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,33 @@ jobs:
files: ./coverage/coverage-final.json
fail_ci_if_error: false

sonarcloud:
name: SonarCloud Analysis
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for better analysis

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Run tests with coverage
run: npm run test:coverage

- name: SonarCloud Scan
uses: SonarSource/sonarqube-scan-action@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
Comment thread
coderabbitai[bot] marked this conversation as resolved.

build:
name: Build
runs-on: ubuntu-latest
Expand Down
24 changes: 24 additions & 0 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
sonar.projectKey=abdullahmujahidali_Cellify
sonar.organization=abdullahmujahidali
sonar.host.url=https://sonarcloud.io

# Project information
sonar.projectName=Cellify
sonar.projectVersion=0.3.0

# Source code location
sonar.sources=src
sonar.tests=tests

# Exclusions
sonar.exclusions=**/node_modules/**,**/dist/**,**/coverage/**,**/wasm/**,**/*.test.ts,**/*.spec.ts

# Test exclusions from coverage
sonar.test.inclusions=**/*.test.ts,**/*.spec.ts

# TypeScript/JavaScript settings
sonar.javascript.lcov.reportPaths=coverage/lcov.info
sonar.typescript.lcov.reportPaths=coverage/lcov.info

# Encoding
sonar.sourceEncoding=UTF-8
Loading