Skip to content

Commit

Permalink
ci: add badges to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
ariwk committed Oct 20, 2024
1 parent fa625d3 commit 8fa264b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
14 changes: 6 additions & 8 deletions .github/workflows/poetry-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,28 +25,26 @@ jobs:
run: poetry install
- name: Run tests
run: poetry run tox
- name: SonarCloud Scan for PR
- name: SonarCloud scan for PR
uses: sonarsource/sonarcloud-github-action@v3
if: github.event_name == 'pull_request'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
with:
args: |
-Dsonar.pullrequest.base=${{ github.base_ref }}
-Dsonar.pullrequest.branch=${{ env.BRANCH_NAME }}
-Dsonar.pullrequest.branch=${{ github.head_ref }}
-Dsonar.pullrequest.key=${{ github.event.pull_request.number }}
- name: SonarCloud Scan for Push
- name: SonarCloud scan for Push
uses: sonarsource/sonarcloud-github-action@v3
if: github.event_name == 'push'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
with:
args: |
-Dsonar.branch.name=${{ env.BRANCH_NAME }}
-Dsonar.branch.name=${{ github.head_ref }}
release-please:
needs: verify-with-tox
runs-on: ubuntu-latest
Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=SchweizerischeBundesbahnen_python-requirements-inspector&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=SchweizerischeBundesbahnen_python-requirements-inspector)
[![Bugs](https://sonarcloud.io/api/project_badges/measure?project=SchweizerischeBundesbahnen_ch.sbb.polarion.extension.generic&metric=bugs)](https://sonarcloud.io/summary/new_code?id=SchweizerischeBundesbahnen_ch.sbb.polarion.extension.generic)
[![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=SchweizerischeBundesbahnen_python-requirements-inspector&metric=code_smells)](https://sonarcloud.io/summary/new_code?id=SchweizerischeBundesbahnen_python-requirements-inspector)
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=SchweizerischeBundesbahnen_python-requirements-inspector&metric=coverage)](https://sonarcloud.io/summary/new_code?id=SchweizerischeBundesbahnen_python-requirements-inspector)
[![Duplicated Lines (%)](https://sonarcloud.io/api/project_badges/measure?project=SchweizerischeBundesbahnen_python-requirements-inspector&metric=duplicated_lines_density)](https://sonarcloud.io/summary/new_code?id=SchweizerischeBundesbahnen_python-requirements-inspector)
[![Lines of Code](https://sonarcloud.io/api/project_badges/measure?project=SchweizerischeBundesbahnen_python-requirements-inspector&metric=ncloc)](https://sonarcloud.io/summary/new_code?id=SchweizerischeBundesbahnen_python-requirements-inspector)

# Python module to inspect any type of functional or non-functional requirements

This module uses [spaCy](https://github.com/explosion/spaCy) to inspect requirements written in English or German.
Expand Down

0 comments on commit 8fa264b

Please sign in to comment.