Merge pull request #2 from MISP/testing

Add code coverage report
stix2.1
Greg Back 2017-05-05 10:17:51 -05:00 committed by GitHub
commit 85b5a1971b
3 changed files with 23 additions and 6 deletions

View File

@ -1,12 +1,16 @@
sudo: false sudo: false
language: python language: python
cache: pip
python: python:
- "2.6" - "2.6"
- "2.7" - "2.7"
- "3.3" - "3.3"
- "3.4" - "3.4"
- "3.5" - "3.5"
- "3.5-dev"
- "3.6" - "3.6"
- "3.6-dev"
- "nightly"
install: install:
- pip install -U pip setuptools - pip install -U pip setuptools
- pip install tox-travis pre-commit - pip install tox-travis pre-commit

View File

@ -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 # 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.* *This is an [OASIS Open Repository](https://www.oasis-open.org/resources/open-repositories/). See the [Governance](#governance) section for more information.*

22
tox.ini
View File

@ -2,8 +2,18 @@
envlist = py26,py27,py33,py34,py35,py36,pycodestyle envlist = py26,py27,py33,py34,py35,py36,pycodestyle
[testenv] [testenv]
deps = pytest deps =
commands = pytest -U
tox
pytest
pytest-cov
coverage
codecov
commands =
py.test --cov=stix2 stix2/test/
codecov
passenv = CI TRAVIS TRAVIS_*
[testenv:pycodestyle] [testenv:pycodestyle]
deps = deps =
@ -25,7 +35,7 @@ max-line-length=160
python = python =
2.6: py26 2.6: py26
2.7: py27, pycodestyle 2.7: py27, pycodestyle
3.3: py33 3.3: py33, pycodestyle
3.4: py34 3.4: py34, pycodestyle
3.5: py35 3.5: py35, pycodestyle
3.6: py36 3.6: py36, pycodestyle