From 90dc999073a319471a4d68e4da284f9bfdcaf077 Mon Sep 17 00:00:00 2001 From: Ilya Baryshev Date: Thu, 19 Feb 2015 20:37:22 +0300 Subject: [PATCH] Update README wording, remove repo token from readme --- CHANGELOG.rst | 4 ++++ README.rst | 39 ++++++++++++++++++--------------------- 2 files changed, 22 insertions(+), 21 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 2ac7cf74..179377a8 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,6 +1,10 @@ Changelog --------- +1.0a3 (TBA) +~~~~~~~~~~~ +* Repo token usage is deprecated (but still supported) in favor of env variable. + 1.0a2 (2015-02-19) ~~~~~~~~~~~~~~~~~~ * Fix latest alpha coverage.py support diff --git a/README.rst b/README.rst index 9e5a34b8..d916e15e 100644 --- a/README.rst +++ b/README.rst @@ -23,13 +23,21 @@ Only projects hosted on Github are supported. .. _Coveralls.io: http://coveralls.io .. _nice features: https://coveralls.io/features +How it works +------------ +It makes custom report for data generated by ``coverage.py`` package and sends it to `json API`_ of coveralls.io service. +All python files in your coverage analysis are posted to this service along with coverage stats, +so please make sure you're not ruining your own security! For private projects there is `Coveralls Pro`_. + +.. _json API: https://coveralls.io/docs/api_reference +.. _Coveralls Pro: https://coveralls.io/docs/pro + Usage (Travis CI) ----------------- -This library will publish your coverage results on coveralls.io for everyone to see (unless you're using pro account). -This package can possibly work with different CI environments, but it's only tested to work with `Travis CI`_ atm. +This package works with any CI environments. Instructions for `Travis CI`_: -1. First, log in via Github and `add your repo`_ on Coveralls website. +1. Log in and `add your repo`_ on Coveralls website. 2. Add ``pip install coveralls`` to ``install`` section of ``.travis.yml`` 3. Make sure you run your tests with coverage during the build in ``script`` part. Example:: @@ -64,16 +72,15 @@ Full example of .travis.yml:: Usage (another CI) ~~~~~~~~~~~~~~~~~~ -If you're NOT using Travis, first option is to provide a ``repo_token`` option in ``.coveralls.yml`` -at the root of your repo. This is your own secret token, which is available at the bottom of your repository's page on Coveralls. -Make sure it stays **secret**, do not put it in your public repo. - -Example of .coveralls.yml:: +The difference from Travis is coveralls authentication via repo token. +It's required to set environment variable ``COVERALLS_REPO_TOKEN`` in you CI build. +This is your own secret token, which is available at the right sidebar of your repository's page on Coveralls. +Launch ``coveralls`` after gathering python coverage in your build script. - # .coveralls.yml - repo_token: TjkDuVpGjuQcRhNW8dots9c8SSnv7ReM5 +Example:: -Another alternative is to use ``COVERALLS_REPO_TOKEN`` env variable. + coverage run --source=myapp setup.py test + COVERALLS_REPO_TOKEN=tGSdG5Qcd2dcQa2oQN9GlJkL50wFZPv1j coveralls .. _add your repo: https://coveralls.io/repos/new .. _Travis CI: http://travis-ci.org @@ -103,16 +110,6 @@ If you'd like to just use json data from coveralls (with other tools):: .. _coveralls-lcov: https://github.com/okkez/coveralls-lcov -How it works ------------- -It makes custom report for data generated by ``coverage.py`` package and sends it to `json API`_ of coveralls.io service. -All python files in your coverage analysis are posted to this service along with coverage stats, -so please make sure you're not ruining your own security! For private projects there is `Coveralls Pro`_. - -.. _json API: https://coveralls.io/docs/api_reference -.. _Coveralls Pro: https://coveralls.io/docs/pro - - Tips for .coveragerc config ---------------------------