From 42519f8b320103d903d880b4e0733bc3b08fe015 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C5=81ukasz=20Langa?= Date: Mon, 26 Mar 2018 00:49:21 -0700 Subject: [PATCH] Coverage reporting --- .coveragerc | 4 ++++ .travis.yml | 6 ++++-- README.md | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) create mode 100644 .coveragerc diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 0000000..7abb9e5 --- /dev/null +++ b/.coveragerc @@ -0,0 +1,4 @@ +[report] +omit = + blib2to3/* + */site-packages/* diff --git a/.travis.yml b/.travis.yml index 8e88019..5452f0f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,12 +2,14 @@ sudo: false language: python cache: pip before_script: -- pip install flake8 flake8-bugbear mypy +- pip install coverage coveralls flake8 flake8-bugbear mypy - pip install -e . script: -- python setup.py test +- coverage run tests/test_black.py - if [[ $TRAVIS_PYTHON_VERSION == '3.6' ]]; then mypy black.py tests/test_black.py; fi - if [[ $TRAVIS_PYTHON_VERSION == '3.6-dev' ]]; then flake8 black.py tests/test_black.py; fi +after_success: +- coveralls notifications: on_success: change on_failure: always diff --git a/README.md b/README.md index 536c6ee..c5166b8 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # black -[![Build Status](https://travis-ci.org/ambv/black.svg?branch=master)](https://travis-ci.org/ambv/black) [![Documentation Status](http://readthedocs.org/projects/black/badge/?version=latest)](http://black.readthedocs.io/en/latest/?badge=latest) ![License: MIT](https://img.shields.io/github/license/ambv/black.svg) ![PyPI](https://img.shields.io/pypi/v/black.svg) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black) +[![Build Status](https://travis-ci.org/ambv/black.svg?branch=master)](https://travis-ci.org/ambv/black) [![Documentation Status](http://readthedocs.org/projects/black/badge/?version=latest)](http://black.readthedocs.io/en/latest/?badge=latest) [![Coverage Status](https://coveralls.io/repos/github/ambv/black/badge.svg?branch=master)](https://coveralls.io/github/ambv/black?branch=master) ![License: MIT](https://img.shields.io/github/license/ambv/black.svg) ![PyPI](https://img.shields.io/pypi/v/black.svg) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black) > Any color you like. -- 2.39.5