Skip to content

Commit

Permalink
proper setup of sonarcloud
Browse files Browse the repository at this point in the history
  • Loading branch information
xeroc committed Aug 14, 2018
1 parent d3c2051 commit 5a5505f
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 5 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Expand Up @@ -15,6 +15,7 @@ install:
- pip install tox-travis codecov
script:
- tox
- sed -i 's/filename="/filename=".\//g' coverage.xml
- sonar-scanner
after_success:
- codecov
Expand Down
Empty file added graphene/__init__.py
Empty file.
10 changes: 10 additions & 0 deletions setup.cfg
Expand Up @@ -6,6 +6,7 @@ test=pytest

[coverage:run]
#source=graphene*
branch=True
omit=
tests/*
.tox/*
Expand Down Expand Up @@ -36,3 +37,12 @@ exclude =
# The conf file is mostly autogenerated, ignore it
docs/conf.py,
max-complexity = 15

# [nosetests]
# with-coverage=1
# with-xunit=1
# #cover-branches=1
# cover-xml=1
# cover-inclusive=1
# detailed-errors=1
# cover-package=graphenebase,grapheneapi,graphenestorage,graphene
26 changes: 22 additions & 4 deletions sonar-project.properties
@@ -1,15 +1,33 @@
# Metadata
sonar.projectKey=graphene:python-graphene
sonar.projectName=Python Graphene Library
sonar.projectVersion=1.0

sonar.sources=.

#sonar.sourceEncoding=UTF-8
# Language
sonar.language=py

# Sources
sonar.sources=graphene,grapheneapi,graphenebase,graphenestorage

# Unit tests
sonar.tests=./tests/

# Linter
#sonar.python.pylint=/usr/local/bin/pylint
#sonar.python.pylint_config=.pylintrc
#sonar.python.pylint.reportPath=pylint-report.txt

sonar.links.homepage=https://bitshares.org
sonar.links.ci=https://travis-ci.org/xeroc/python-graphenelib/
sonar.links.issue=https://github.com/xeroc/python-graphenelib/issues
sonar.links.scm=https://github.com/xeroc/python-graphenelib/tree/master

sonar.exclusions=htmlcov/*,docs/*,build/*,dist/*,*.py,tests/*
sonar.sources=graphene,grapheneapi,graphenebase,graphenestorage

# coverage
# sonar.python.xunit.reportPath=test-reports/*.xml
#sonar.python.coverage.reportPath=coverage.xml

sonar.python.xunit.reportPath=nosetests.xml
sonar.python.coverage.reportPath=coverage.xml
#sonar.python.coveragePlugin=cobertura
3 changes: 2 additions & 1 deletion tox.ini
Expand Up @@ -5,9 +5,10 @@ skip_missing_interpreters = true
[testenv]
deps=-rrequirements-test.txt
commands=
coverage run -a setup.py test
coverage run setup.py test
coverage report
coverage html
coverage xml -i

[testenv:lint]
deps=
Expand Down

0 comments on commit 5a5505f

Please sign in to comment.