Skip to content

Commit

Permalink
Add coverage collecting for travis.
Browse files Browse the repository at this point in the history
Also, remove pre-commit from requirements and add CIs badges to readme.
  • Loading branch information
EvgeneOskin committed Feb 4, 2016
1 parent 4dab5df commit ce05f5d
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 9 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ dist
.ropeproject
.eggs
__pycache__
coverage.xml
8 changes: 5 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
language: python
python:
- "2.7"
- "3.2"
- "3.3"
- "3.4"
- "3.5"
- "3.5-dev" # 3.5 development branch
Expand All @@ -12,5 +10,9 @@ install:
# command to run tests
script:
- paver lint
- paver nosetests
- paver coverage
- PATH=$PWD/bin:$PATH paver bats

addons:
code_climate:
repo_token: f12006bd2fc1828b90e76ba38458b741fbf1f6ec67b46d4653a40814b17d23e0
12 changes: 12 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
Serverauditor ssh config utility
================================

.. image:: https://travis-ci.org/Crystalnix/serverauditor-sshconfig.svg?branch=master
:target: https://travis-ci.org/Crystalnix/serverauditor-sshconfig

.. image:: https://codeclimate.com/github/Crystalnix/serverauditor-sshconfig/badges/gpa.svg
:target: https://codeclimate.com/github/Crystalnix/serverauditor-sshconfig
:alt: Code Climate

.. image:: https://codeclimate.com/github/Crystalnix/serverauditor-sshconfig/badges/coverage.svg
:target: https://codeclimate.com/github/Crystalnix/serverauditor-sshconfig/coverage
:alt: Test Coverage



Installation
------------
Expand Down
3 changes: 0 additions & 3 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,3 @@ nose
coverage
prospector[with_pyroma]
paver
ptpython
pudb
pre-commit
9 changes: 8 additions & 1 deletion pavement.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,14 @@ def bats():
@task
def nosetests():
"""Run unit tests."""
sh('python setup.py test')
sh('nosetests')


@task
def coverage():
"""Run test and collect coverage."""
sh('nosetests --with-coverage')
sh('coverage xml')


@task
Expand Down
2 changes: 1 addition & 1 deletion serverauditor_sshconfig/cloud/client/cryptor.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def hmac_salt(self, value):
@property
def initialization_vector(self):
"""Generate random bytes."""
return os.urandom(self.AES_BLOCK_SIZE / 8)
return os.urandom(int(self.AES_BLOCK_SIZE / 8))

@property
def encryption_key(self):
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# and then run "tox" from this directory.

[tox]
envlist = py27,py34
envlist = py27,py35
skipsdist = True

[testenv]
Expand Down

0 comments on commit ce05f5d

Please sign in to comment.