From 901e143bb08de5bbc85d41bb0ee794b1fededc9c Mon Sep 17 00:00:00 2001 From: Victor Arnaud Date: Tue, 2 May 2017 23:52:00 -0300 Subject: [PATCH 1/3] Create codeclimate yml --- .codeclimate.yml | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .codeclimate.yml diff --git a/.codeclimate.yml b/.codeclimate.yml new file mode 100644 index 000000000..ad098bd49 --- /dev/null +++ b/.codeclimate.yml @@ -0,0 +1,41 @@ +engines: + csslint: + enabled: true + checks: + important: + enabled: false + duplication: + enabled: true + config: + languages: + count_threshold: 3 + python: + python_version: 3 + mass_threshold: 60 + eslint: + enabled: true + fixme: + enabled: true + radon: + enabled: true + pep8: + enabled: true + checks: + E501: + enabled: false + E111: + enabled: false + E114: + enabled: false +ratings: + paths: + - "**.js" + - "**.py" + - "**.css" + - "**.html" +exclude_paths: + - "manage.py" + - "sapl/__init__.py" + - "sapl/**/migrations/*" + - "sapl/**/legacy/*" + - "sapl/relatorios/" From 0d6fc3ea022ef06a9e789c430140d049a834024b Mon Sep 17 00:00:00 2001 From: Victor Arnaud Date: Tue, 9 May 2017 23:51:57 -0300 Subject: [PATCH 2/3] Insert codeclimate test coverage --- .travis.yml | 4 ++++ requirements/requirements.txt | 1 + 2 files changed, 5 insertions(+) diff --git a/.travis.yml b/.travis.yml index 0e0a27ad4..d9c38c66b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,7 +20,11 @@ script: - ./manage.py bower install - py.test --create-db # - ./test_and_check_qa.sh + - coverage run my_program.py arg1 arg2 addons: hosts: - 127.0.0.1 sapldb + +after_sucess: + - CODECLIMATE_REPO_TOKEN=4d19e43ef9a92ca21314499fc1cc4e127cc5a4dea7fcc5b8e36e03780ada43c9 codeclimate-test-reporter diff --git a/requirements/requirements.txt b/requirements/requirements.txt index 6d7592cda..0b07a0ff2 100644 --- a/requirements/requirements.txt +++ b/requirements/requirements.txt @@ -32,3 +32,4 @@ python-magic==0.4.12 gunicorn==19.6.0 django-reversion==2.0.8 whoosh==2.7.4 +codeclimate-test-reporter From abb119fb86a32a0fa5c6bd1a283c777a6654a4a7 Mon Sep 17 00:00:00 2001 From: Victor Arnaud Date: Wed, 10 May 2017 00:21:33 -0300 Subject: [PATCH 3/3] Inserindo coverage no travis --- .travis.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index d9c38c66b..3994db636 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,9 +18,7 @@ before_script: script: - ./manage.py migrate - ./manage.py bower install - - py.test --create-db - # - ./test_and_check_qa.sh - - coverage run my_program.py arg1 arg2 + - py.test --create-db --cov . --cov-report term addons: hosts: