Skip to content
Merged
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
36 changes: 36 additions & 0 deletions .github/workflows/sonarcloud-scan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: SonarCloud Scan

on:
pull_request:
push:
branches:
- master

jobs:
build:
name: Build and analyze
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 20

- name: Install dependencies
run: yarn install

- name: Build project
run: yarn build

- name: Run tests and collect coverage
run: yarn test --coverage --coverageReporters=lcov

- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
26 changes: 26 additions & 0 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Project identification
sonar.projectKey=celonis_content-cli
sonar.organization=celonis
sonar.projectName=Content CLI

# Source code location
sonar.sources=src

# Test location
sonar.tests=tests

# Encoding
sonar.sourceEncoding=UTF-8

# Coverage reporting (from Jest / ts-jest)
sonar.javascript.lcov.reportPaths=coverage/lcov.info

# Exclusions (optional, adjust as needed)
# Ignore built files and configs
sonar.exclusions=dist/**, node_modules/**, coverage/**, **/*.test.ts

# Test file inclusions
sonar.test.inclusions=**/*.test.ts, **/*.spec.ts

# Report verbose output
sonar.verbose=true
Loading