Skip to content

Commit

Permalink
chore: update with open-source-polarion-python-repo-template
Browse files Browse the repository at this point in the history
  • Loading branch information
ariwk committed Oct 22, 2024
1 parent a0217c3 commit 7235548
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 19 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/poetry-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- name: 📄 Checkout code
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
fetch-depth: 0
- name: 🧱 Install Poetry
run: curl -sSL https://install.python-poetry.org | python3 -
- name: 🧱 Setup Python
Expand All @@ -23,10 +23,10 @@ jobs:
cache: poetry
- name: 🧱 Install dependencies
run: poetry install
- name: Run tests
- name: 🧪 Run tests
run: poetry run tox
- name: SonarCloud scan for PR
uses: sonarsource/sonarcloud-github-action@383f7e52eae3ab0510c3cb0e7d9d150bbaeab838 # v3
uses: sonarsource/sonarcloud-github-action@383f7e52eae3ab0510c3cb0e7d9d150bbaeab838 # v3
if: github.event_name == 'pull_request'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information
Expand All @@ -37,7 +37,7 @@ jobs:
-Dsonar.pullrequest.branch=${{ github.head_ref }}
-Dsonar.pullrequest.key=${{ github.event.pull_request.number }}
- name: SonarCloud scan for Push
uses: sonarsource/sonarcloud-github-action@383f7e52eae3ab0510c3cb0e7d9d150bbaeab838 # v3
uses: sonarsource/sonarcloud-github-action@383f7e52eae3ab0510c3cb0e7d9d150bbaeab838 # v3
if: github.event_name == 'push'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information
Expand All @@ -53,7 +53,7 @@ jobs:
contents: write
pull-requests: write
steps:
- name: release-please
- name: 🚀 release-please
id: release
uses: googleapis/release-please-action@db8f2c60ee802b3748b512940dde88eabd7b7e01 # v3
with:
Expand Down
19 changes: 12 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,18 @@ repos:
- id: no-commit-to-branch
- id: mixed-line-ending
- id: end-of-file-fixer
- repo: local
hooks:
- id: sensitive-data-leak-urls
name: Sensitive data leak - URLs
entry: (?<!polarion-opensource@)(?<!www\.)sbb\.ch
language: pygrep
types: [text]
- id: sensitive-data-leak-ue-numbers
name: Sensitive data leak - UE numbers
entry: \b([uUeE]{1,2})\d{5,6}\b
language: pygrep
types: [text]
- repo: local
hooks:
- id: mypy
Expand Down Expand Up @@ -52,10 +64,3 @@ repos:
rev: v3.29.1
hooks:
- id: commitizen
- repo: local
hooks:
- id: sensitive-data-leak
name: Sensitive data leak hook
entry: (?<!polarion-opensource@)sbb\.ch
language: pygrep
types: [text]
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
[![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)
[![Bugs](https://sonarcloud.io/api/project_badges/measure?project=SchweizerischeBundesbahnen_python-requirements-inspector&metric=bugs)](https://sonarcloud.io/summary/new_code?id=SchweizerischeBundesbahnen_python-requirements-inspector)
[![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)
[![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=SchweizerischeBundesbahnen_python-requirements-inspector&metric=reliability_rating)](https://sonarcloud.io/summary/new_code?id=SchweizerischeBundesbahnen_python-requirements-inspector)
[![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=SchweizerischeBundesbahnen_python-requirements-inspector&metric=security_rating)](https://sonarcloud.io/summary/new_code?id=SchweizerischeBundesbahnen_python-requirements-inspector)
[![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=SchweizerischeBundesbahnen_python-requirements-inspector&metric=sqale_rating)](https://sonarcloud.io/summary/new_code?id=SchweizerischeBundesbahnen_python-requirements-inspector)
[![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=SchweizerischeBundesbahnen_python-requirements-inspector&metric=vulnerabilities)](https://sonarcloud.io/summary/new_code?id=SchweizerischeBundesbahnen_python-requirements-inspector)

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

Expand Down
15 changes: 9 additions & 6 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7235548

Please sign in to comment.