Skip to content

Commit 0ffa471

Browse files
committed
ci: add sonarqube configuration
1 parent 5a02768 commit 0ffa471

5 files changed

Lines changed: 50 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: CI
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches: [main]
7+
tags: [v*]
8+
pull_request:
9+
types: [opened, synchronize, reopened]
10+
11+
jobs:
12+
ci:
13+
name: Checkout, SonarQube scan
14+
runs-on: ubuntu-24.04
15+
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v6
19+
with:
20+
fetch-depth: 0
21+
22+
- name: Run SonarQube scan
23+
uses: minvws/action-sonarqube@v1
24+
with:
25+
sonar-token: ${{ secrets.SONAR_TOKEN }}
26+
allow-run-on-dependabot: 'true'
27+

.vscode/extensions.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"recommendations": [
3+
"sonarsource.sonarlint-vscode"
4+
]
5+
}

sonar-project.properties

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Project info
2+
sonar.organization=vws
3+
sonar.projectKey=minvws_nl-mgo-metric-service
4+
sonar.projectName=nl-mgo-metric-service
5+
6+
# Info links shown in SonarCloud
7+
sonar.links.homepage=https://github.com/minvws/nl-mgo-metric-service
8+
9+
# Encoding and language specific properties
10+
sonar.sourceEncoding=UTF-8
11+
sonar.python.version=3.11
12+
13+
# Analysis scoping
14+
sonar.sources=src
15+
sonar.tests=tests
16+
17+
# Code coverage
18+
sonar.python.coverage.reportPaths=coverage.xml

src/.gitkeep

Whitespace-only changes.

tests/.gitkeep

Whitespace-only changes.

0 commit comments

Comments
 (0)