From 95a3df360ea3237fa8854a35d659fb9537231175 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20Montan=CC=83ana?= Date: Wed, 18 May 2022 12:19:32 +0200 Subject: [PATCH] add sonar build --- .github/workflows/build.yml | 23 +++++++++++++++++++++++ README.md | 2 ++ sonar-project.properties | 1 + 3 files changed, 26 insertions(+) create mode 100644 .github/workflows/build.yml create mode 100644 sonar-project.properties diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..1c521f7 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,23 @@ +name: Build +on: + push: + branches: + - main # or the name of your main branch +jobs: + build: + name: Build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - uses: sonarsource/sonarqube-scan-action@master + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} + # If you wish to fail your job when the Quality Gate is red, uncomment the + # following lines. This would typically be used to fail a deployment. + - uses: sonarsource/sonarqube-quality-gate-action@master + timeout-minutes: 5 + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} diff --git a/README.md b/README.md index 8d8cdb1..56c528d 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,8 @@ [![Language grade: Python](https://img.shields.io/lgtm/grade/python/g/Doctorado-ML/mufs.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/Doctorado-ML/mufs/context:python) [![PyPI version](https://badge.fury.io/py/MUFS.svg)](https://badge.fury.io/py/MUFS) ![https://img.shields.io/badge/python-3.8%2B-blue](https://img.shields.io/badge/python-3.8%2B-brightgreen) +[![Security Rating](https://haystack.rmontanana.es:25000/api/project_badges/measure?project=mufs&metric=security_rating&token=1119a3bfd4025d50ef3009a44c600c16670ee31a)](http://haystack.local:25000/dashboard?id=mufs) +[![Technical Debt](https://haystack.rmontanana.es:25000/api/project_badges/measure?project=mufs&metric=sqale_index&token=1119a3bfd4025d50ef3009a44c600c16670ee31a)](http://haystack.local:25000/dashboard?id=mufs) # MUFS diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 0000000..e0aaa3a --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1 @@ +sonar.projectKey=mufs