Skip to content

Commit

Permalink
Merge pull request #32 from GenomicDataInfrastructure/18-gdi-ckanext-…
Browse files Browse the repository at this point in the history
…fairdatapoint-enable-sonar-check

feat(ci): integrate SonarCloud analysis and coverage report closes #18
  • Loading branch information
brunopacheco1 authored Jun 28, 2024
2 parents 5d35b93 + d2a3c5f commit e1e4f6d
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 2 deletions.
10 changes: 9 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,15 @@ jobs:
ckan -c test.ini db init
- name: Run tests
run: pytest --ckan-ini=test.ini --cov=ckanext.fairdatapoint --disable-warnings ckanext/fairdatapoint
run: pytest --ckan-ini=test.ini --cov=ckanext.fairdatapoint --disable-warnings ckanext/fairdatapoint
- name: Generate coverage report
run: coverage xml -o coverage.xml
- name: SonarCloud Scan
uses: sonarsource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

- uses: actions/checkout@v4
- name: REUSE Compliance Check
uses: fsfe/reuse-action@v2
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ SPDX-License-Identifier: CC-BY-4.0

[![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)
[![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)
[![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)
[![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)
[![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)
[![GitHub contributors](https://img.shields.io/github/contributors/GenomicDataInfrastructure/gdi-userportal-ckanext-fairdatapoint)](https://github.com/GenomicDataInfrastructure/gdi-userportal-ckanext-fairdatapoint/graphs/contributors)
Expand Down
12 changes: 12 additions & 0 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# SPDX-FileCopyrightText: 2024 LNDS
#
# SPDX-License-Identifier: CC-BY-4.0

sonar.projectKey=GenomicDataInfrastructure_gdi-userportal-ckanext-fairdatapoint
sonar.organization=genomicdatainfrastructure
sonar.sources=ckanext/fairdatapoint
sonar.exclusions=**/tests/**
sonar.tests=ckanext/fairdatapoint/tests
sonar.test.inclusions=ckanext/fairdatapoint/tests/**/*.py
sonar.python.coverage.reportPaths=coverage.xml
sonar.python.version=3.10
2 changes: 1 addition & 1 deletion test.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
; SPDX-FileCopyrightText: 2024 Stichting Health-RI
;
; SPDX-License-Identifier: Apache-2.0
; SPDX-License-Identifier: CC-BY-4.0


[DEFAULT]
Expand Down

0 comments on commit e1e4f6d

Please sign in to comment.