Skip to content

Commit

Permalink
ci: update SonarQube action and configure project settings
Browse files Browse the repository at this point in the history
- Replace SonarCloud with SonarQube for code analysis
- Update SonarQube action to v4
- Remove GITHUB_TOKEN from SonarQube env vars
- Add project-specific settings to sonar-project.properties
- Update README badge links
- Configure Sphinx builder in .readthedocs.yaml
  • Loading branch information
tanbro committed Jan 21, 2025
1 parent e9a197a commit f9699cf
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 14 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,9 @@ jobs:
coverage run -m unittest -fcv
coverage report -m
coverage xml
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
- name: SonarQube Scan
uses: SonarSource/sonarqube-scan-action@v4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

build:
Expand Down
4 changes: 4 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@

version: 2

sphinx:
builder: html
configuration: conf.py

build:
os: ubuntu-22.04
tools:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[![Python Package](https://github.com/tanbro/jinjyaml/actions/workflows/python-package.yml/badge.svg)](https://github.com/tanbro/jinjyaml/actions/workflows/python-package.yml)
[![PyPI](https://img.shields.io/pypi/v/jinjyaml.svg)](https://pypi.org/project/jinjyaml/)
[![Documentation Status](https://readthedocs.org/projects/jinjyaml/badge/?version=latest)](https://jinjyaml.readthedocs.io/en/latest/?badge=latest)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=tanbro_jinjyaml&metric=alert_status)](https://sonarcloud.io/dashboard?id=tanbro_jinjyaml)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=tanbro_jinjyaml&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=tanbro_jinjyaml)
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=tanbro_jinjyaml&metric=coverage)](https://sonarcloud.io/summary/new_code?id=tanbro_jinjyaml)

An application-specific tag for [Jinja2][] templates within [PyYAML][].
Expand Down
31 changes: 21 additions & 10 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -1,10 +1,21 @@
sonar.projectKey=tanbro_jinjyaml
sonar.organization=tanbro

# relative paths to source directories. More details and properties are described
# in https://sonarcloud.io/documentation/project-administration/narrowing-the-focus/
sonar.sources=src
sonar.tests=tests

sonar.python.version=3.7, 3.8, 3.9, 3.10, 3.10, 3.11
sonar.python.coverage.reportPaths=coverage.xml
sonar.projectKey=tanbro_jinjyaml
sonar.organization=tanbro

# This is the name and version displayed in the SonarCloud UI.
sonar.projectName=jinjyaml
#sonar.projectVersion=1.0


# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows.
#sonar.sources=.

# Encoding of the source code. Default is default system encoding
#sonar.sourceEncoding=UTF-8

# relative paths to source directories. More details and properties are described
# in https://sonarcloud.io/documentation/project-administration/narrowing-the-focus/
sonar.sources=src
sonar.tests=tests

sonar.python.version=3.7, 3.8, 3.9, 3.10, 3.10, 3.11, 3.12, 3.13
sonar.python.coverage.reportPaths=coverage.xml

0 comments on commit f9699cf

Please sign in to comment.