Skip to content

Commit

Permalink
chore: add tox.ini
Browse files Browse the repository at this point in the history
  • Loading branch information
ariwk committed Oct 22, 2024
1 parent db9ced1 commit d2ed280
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
21 changes: 21 additions & 0 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
sonar.projectKey=SchweizerischeBundesbahnen_open-source-polarion-python-repo-template
sonar.organization=schweizerischebundesbahnen

# This is the name and version displayed in the SonarCloud UI.
#sonar.projectName=python-requirements-inspector
#sonar.projectVersion=1.0

# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows.
sonar.sources=open-source-polarion-python-repo-template

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

# Additional parameters
sonar.python.xunit.reportPaths=junittest.xml
sonar.python.coverage.reportPaths=coverage.xml
#sonar.branch.target = main
#sonar.test.exclusions=tests/**
#sonar.tests=tests/
sonar.python.version=3.12
sonar.qualitygate.wait=true
28 changes: 28 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
[tox]
isolated_build = True
envlist =
lint
py312

[testenv:lint]
deps =
ruff
mypy
commands =
ruff format
ruff check
mypy .

[testenv]
deps =
coverage
pytest
commands =
coverage run -m pytest . --junitxml="junittest.xml"
coverage report -m --fail-under 90
coverage xml

[coverage:run]
relative_files = True
source = open_source_polarion_python_repo_template/
branch = True

0 comments on commit d2ed280

Please sign in to comment.