From 83997b1135f5828f26fb1d84a1ec598b588b665b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vinot?= Date: Tue, 18 Apr 2017 10:48:04 +0200 Subject: [PATCH] Add code coverage report --- .travis.yml | 4 ++++ README.md | 3 +++ tox.ini | 22 ++++++++++++++++------ 3 files changed, 23 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index ff4730e..1937814 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,12 +1,16 @@ sudo: false language: python +cache: pip python: - "2.6" - "2.7" - "3.3" - "3.4" - "3.5" + - "3.5-dev" - "3.6" + - "3.6-dev" + - "nightly" install: - pip install -U pip setuptools - pip install tox-travis pre-commit diff --git a/README.md b/README.md index 0f9a7cf..d209911 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,6 @@ +[![Build Status](https://travis-ci.org/oasis-open/cti-python-stix2.svg?branch=master)](https://travis-ci.org/oasis-open/cti-python-stix2) +[![codecov](https://codecov.io/gh/oasis-open/cti-python-stix2/branch/master/graph/badge.svg)](https://codecov.io/gh/oasis-open/cti-python-stix2) + # cti-python-stix2 *This is an [OASIS Open Repository](https://www.oasis-open.org/resources/open-repositories/). See the [Governance](#governance) section for more information.* diff --git a/tox.ini b/tox.ini index fd580f9..0b0a773 100644 --- a/tox.ini +++ b/tox.ini @@ -2,8 +2,18 @@ envlist = py26,py27,py33,py34,py35,py36,pycodestyle [testenv] -deps = pytest -commands = pytest +deps = + -U + tox + pytest + pytest-cov + coverage + codecov +commands = + py.test --cov=stix2 stix2/test/ + codecov + +passenv = CI TRAVIS TRAVIS_* [testenv:pycodestyle] deps = @@ -24,7 +34,7 @@ max-line-length=160 python = 2.6: py26 2.7: py27, pycodestyle - 3.3: py33 - 3.4: py34 - 3.5: py35 - 3.6: py36 + 3.3: py33, pycodestyle + 3.4: py34, pycodestyle + 3.5: py35, pycodestyle + 3.6: py36, pycodestyle