Skip to content

Commit e1e4f6d

Browse files
Merge pull request #32 from GenomicDataInfrastructure/18-gdi-ckanext-fairdatapoint-enable-sonar-check
feat(ci): integrate SonarCloud analysis and coverage report closes #18
2 parents 5d35b93 + d2a3c5f commit e1e4f6d

File tree

4 files changed

+23
-2
lines changed

4 files changed

+23
-2
lines changed

.github/workflows/test.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,15 @@ jobs:
5555
5656
ckan -c test.ini db init
5757
- name: Run tests
58-
run: pytest --ckan-ini=test.ini --cov=ckanext.fairdatapoint --disable-warnings ckanext/fairdatapoint
58+
run: pytest --ckan-ini=test.ini --cov=ckanext.fairdatapoint --disable-warnings ckanext/fairdatapoint
59+
- name: Generate coverage report
60+
run: coverage xml -o coverage.xml
61+
- name: SonarCloud Scan
62+
uses: sonarsource/sonarcloud-github-action@master
63+
env:
64+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
65+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
66+
5967
- uses: actions/checkout@v4
6068
- name: REUSE Compliance Check
6169
uses: fsfe/reuse-action@v2

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ SPDX-License-Identifier: CC-BY-4.0
88

99
[![REUSE status](https://api.reuse.software/badge/github.com/GenomicDataInfrastructure/gdi-userportal-ckanext-fairdatapoint)](https://api.reuse.software/info/github.com/GenomicDataInfrastructure/gdi-userportal-ckanext-fairdatapoint)
1010
[![Tests](https://github.com/GenomicDataInfrastructure/gdi-userportal-ckanext-fairdatapoint/actions/workflows/test.yml/badge.svg)](https://github.com/GenomicDataInfrastructure/gdi-userportal-ckanext-fairdatapoint/actions/workflows/test.yml)
11+
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=GenomicDataInfrastructure_gdi-userportal-ckanext-fairdatapoint&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=GenomicDataInfrastructure_gdi-userportal-ckanext-fairdatapoint)
1112
[![Release](https://github.com/GenomicDataInfrastructure/gdi-userportal-ckanext-fairdatapoint/actions/workflows/release.yml/badge.svg)](https://github.com/GenomicDataInfrastructure/gdi-userportal-ckanext-fairdatapoint/actions/workflows/release.yml)
1213
[![Main](https://github.com/GenomicDataInfrastructure/gdi-userportal-ckanext-fairdatapoint/actions/workflows/main.yml/badge.svg)](https://github.com/GenomicDataInfrastructure/gdi-userportal-ckanext-fairdatapoint/actions/workflows/main.yml)
1314
[![GitHub contributors](https://img.shields.io/github/contributors/GenomicDataInfrastructure/gdi-userportal-ckanext-fairdatapoint)](https://github.com/GenomicDataInfrastructure/gdi-userportal-ckanext-fairdatapoint/graphs/contributors)

sonar-project.properties

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# SPDX-FileCopyrightText: 2024 LNDS
2+
#
3+
# SPDX-License-Identifier: CC-BY-4.0
4+
5+
sonar.projectKey=GenomicDataInfrastructure_gdi-userportal-ckanext-fairdatapoint
6+
sonar.organization=genomicdatainfrastructure
7+
sonar.sources=ckanext/fairdatapoint
8+
sonar.exclusions=**/tests/**
9+
sonar.tests=ckanext/fairdatapoint/tests
10+
sonar.test.inclusions=ckanext/fairdatapoint/tests/**/*.py
11+
sonar.python.coverage.reportPaths=coverage.xml
12+
sonar.python.version=3.10

test.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
; SPDX-FileCopyrightText: 2024 Stichting Health-RI
22
;
3-
; SPDX-License-Identifier: Apache-2.0
3+
; SPDX-License-Identifier: CC-BY-4.0
44

55

66
[DEFAULT]

0 commit comments

Comments
 (0)