Parcourir la source

Merge pull request #253 from kalliope-project/coveralls

add coveralls
Monf il y a 8 ans
Parent
commit
edff39a662
4 fichiers modifiés avec 16 ajouts et 10 suppressions
  1. 8 2
      .travis.yml
  2. 4 4
      README.md
  3. 2 2
      Tests/test_brain_loader.py
  4. 2 2
      setup.py

+ 8 - 2
.travis.yml

@@ -19,11 +19,17 @@ before_install:
 - wget https://bootstrap.pypa.io/get-pip.py
 - sudo python get-pip.py
 
-install: "pip install -r install/files/python_requirements.txt"
+install:
+  - pip install -r install/files/python_requirements.txt
+  - pip install coveralls
 
 # command to run tests
 script:
-  - pytest
+#  - pytest
   - docker run -it --rm kalliope-ubuntu1604
   - docker run -it --rm kalliope-debian8
+  - coverage run --source=kalliope -m unittest discover
+
+after_success:
+  coveralls
 

+ 4 - 4
README.md

@@ -1,10 +1,10 @@
-# Kalliope
-
 [![Build Status](https://travis-ci.org/kalliope-project/kalliope.svg)](https://travis-ci.org/kalliope-project/kalliope)
+[![Coverage Status](https://coveralls.io/repos/github/kalliope-project/kalliope/badge.svg)](https://coveralls.io/github/kalliope-project/kalliope)
 [![Gitter](https://badges.gitter.im/gitterHQ/gitter.svg)](https://gitter.im/kalliope-project/Lobby)
 
-
-![logo](images/Kalliope_logo_large.png)
+<p align="center">
+    <img src="images/Kalliope_logo_large.png">
+</p>
 
 Kalliope is a modular always-on voice controlled personal assistant designed for home automation.
 Kalliope is based on audio input recognition, so it recognize an order pronounced by the user and then execute actions attached to the order.

+ 2 - 2
Tests/test_brain_loader.py

@@ -17,7 +17,7 @@ class TestBrainLoader(unittest.TestCase):
 
     def setUp(self):
         # be sure the brain haven't been instantiated before
-        Singleton._instances = {}
+        Singleton._instances = dict()
         if "/Tests" in os.getcwd():
             self.brain_to_test = os.getcwd() + os.sep + "brains/brain_test.yml"
         else:
@@ -40,7 +40,7 @@ class TestBrainLoader(unittest.TestCase):
         ]
 
     def tearDown(self):
-        Singleton._instances = {}
+        Singleton._instances = dict()
 
     def test_get_yaml_config(self):
         """

+ 2 - 2
setup.py

@@ -64,8 +64,8 @@ setup(
         'pyasn1>=0.2.3',
         'ansible>=2.2',
         'python2-pythondialog>=3.4.0',
-        'jinja2>=2.8,<2.9',
-        'cffi==1.9.1',
+        'jinja2>=2.8,<=2.9.6',
+        'cffi>=1.9.1',
         'ipaddress>=1.0.17',
         'flask>=0.12',
         'Flask-Restful>=0.3.5',