Skip to content

Commit

Permalink
Add Codecov deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
seignovert committed Feb 9, 2019
1 parent 0717a83 commit 32ba062
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 17 deletions.
2 changes: 0 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ install:
- pip install tox-travis
script:
- tox
after_success:
- test $JOB = "tests" && pip install python-coveralls && coveralls

deploy:
- provider: pypi
Expand Down
2 changes: 1 addition & 1 deletion .zenodo.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"title": "CI/CD examples to test and deploy python packages from Github",
"description": "<p>Python project to showcase how to hook Github with:</p><ul><li>Travis CI</li><li>Coveralls.io</li><li>PyPI</li><li>Anaconda</li><li>Read the Docs</li><li>Github Pages</li><li>Github Releases</li><li>Zenodo</li></ul><p>See <a href=\"https://github.com/seignovert/test-python-docs/blob/master/setup.cfg\">setup.cfg</a> to configure:</p><ul><li>package description (name, author, url, files…).</li><li>PyPI deploy settings.</li><li>Pytest options.</li><li>Coverage report settings.</li><li>Linter settings.</li></ul><p>See <a href=\"https://github.com/seignovert/test-python-docs/blob/master/tox.ini\">tox.ini</a> to configure:</p><ul><li>module tests from <em>tests/</em> folder (with <cite>pytest</cite>).</li><li>module coverage (from <cite>pytest</cite> output).</li><li>documentation build from <em>docs/</em> folder (with <cite>sphinx</cite>, <cite>autodoc</cite> and <cite>napoleon</cite>).</li><li>documentation tests from <em>docs/*.rst</em> files and docstrings in <em>foo</em> module.</li><li>linter python files syntax (with <cite>flake8</cite>).</li></ul><p>See <a href=\"https://github.com/seignovert/test-python-docs/blob/master/.travis.yml\">.travis.yml</a> to configure CI tests and deployments to:</p><ul><li><a href=\"https://coveralls.io/github/seignovert/test-python-docs\">Coveralls.io</a></li><li><a href=\"https://test.pypi.org/project/foo-autodeploy/\">PyPI (test)</a></li><li><a href=\"https://anaconda.org/seignovert/foo-autodeploy\">Anaconda</a></li><li><a href=\"https://github.com/seignovert/test-python-docs/releases\">Github Releases</a></li><li><a href=\"https://seignovert.github.io/test-python-docs/\">Github Pages</a></li></ul><p>See <a href=\"https://github.com/seignovert/test-python-docs/blob/master/recipe/\">recipe/</a> folder to configure:</p><ul><li><a href=\"https://github.com/seignovert/test-python-docs/blob/master/meta.yaml\">meta.yaml</a> of conda recipe</li><li><a href=\"https://github.com/seignovert/test-python-docs/blob/master/deploy.sh\">deploy.sh</a> to install miniconda3, build and deploy from Travis-CI to Anaconda.</li></ul><p>See <a href=\"https://github.com/seignovert/test-python-docs/blob/master/.readthedocs.yml\">.readthedocs.yml</a> to configure <a href=\"https://test-python-docs.readthedocs.io/\">Read the Docs</a> deployment.</p><p>See <a href=\"https://github.com/seignovert/test-python-docs/blob/master/.zenodo.json\">.zenodo.json</a> to configure <a href=\"https://zenodo.org\">Zenodo</a> deployment, to get a DOI for each <a href=\"https://guides.github.com/activities/citable-code/\">Github release</a>.</p><p>(Note: in this test case, we hook our release with Zenodo sandbox interface to avoid dummy publications, therefore the DOI badge is not valid but the record can be found <a href=\"https://sandbox.zenodo.org/record/257354\">here</a>).</p><strong>Sphinx autobuild (tip)</strong><p>Install:</p><pre><code>$ pip install sphinx-autobuild</code></pre><p>Start autobuild (with live reload):</p><pre><code>$ cd docs ; make livehtml</code></pre>",
"description": "<p>Python project to showcase how to hook Github with:</p><ul><li>Read the Docs</li><li>Travis CI</li><li>Codecov</li><li>Coveralls</li><li>PyPI</li><li>Anaconda</li><li>Github Pages</li><li>Github Releases</li><li>Zenodo</li></ul><p>See <a href=\"https://github.com/seignovert/test-python-docs/blob/master/setup.cfg\">setup.cfg</a> to configure:</p><ul><li>package description (name, author, url, files…).</li><li>PyPI deploy settings.</li><li>Pytest options.</li><li>Coverage report settings.</li><li>Linter settings.</li></ul><p>See <a href=\"https://github.com/seignovert/test-python-docs/blob/master/tox.ini\">tox.ini</a> to configure:</p><ul><li>module tests from <em>tests/</em> folder (with <cite>pytest</cite>).</li><li>module coverage (from <cite>pytest</cite> output).</li><li>documentation build from <em>docs/</em> folder (with <cite>sphinx</cite>, <cite>autodoc</cite> and <cite>napoleon</cite>).</li><li>documentation tests from <em>docs/*.rst</em> files and docstrings in <em>foo</em> module.</li><li>linter python files syntax (with <cite>flake8</cite>).</li></ul><p>See <a href=\"https://github.com/seignovert/test-python-docs/blob/master/.readthedocs.yml\">.readthedocs.yml</a> to configure <a href=\"https://test-python-docs.readthedocs.io/\">Read the Docs</a> deployment.</p><p>See <a href=\"https://github.com/seignovert/test-python-docs/blob/master/.travis.yml\">.travis.yml</a> to configure CI tests and deployments to:</p><ul><li><a href=\"https://codecov.io/gh/seignovert/test-python-docs\">Codecov</a></li><li><a href=\"https://coveralls.io/github/seignovert/test-python-docs\">Coveralls</a></li><li><a href=\"https://test.pypi.org/project/foo-autodeploy/\">PyPI (test)</a></li><li><a href=\"https://anaconda.org/seignovert/foo-autodeploy\">Anaconda</a></li><li><a href=\"https://github.com/seignovert/test-python-docs/releases\">Github Releases</a></li><li><a href=\"https://seignovert.github.io/test-python-docs/\">Github Pages</a></li></ul><p>See <a href=\"https://github.com/seignovert/test-python-docs/blob/master/recipe/\">recipe/</a> folder to configure:</p><ul><li><a href=\"https://github.com/seignovert/test-python-docs/blob/master/meta.yaml\">meta.yaml</a> of conda recipe</li><li><a href=\"https://github.com/seignovert/test-python-docs/blob/master/deploy.sh\">deploy.sh</a> to install miniconda3, build and deploy from Travis-CI to Anaconda.</li></ul><p>See <a href=\"https://github.com/seignovert/test-python-docs/blob/master/.zenodo.json\">.zenodo.json</a> to configure <a href=\"https://zenodo.org\">Zenodo</a> deployment, to get a DOI for each <a href=\"https://guides.github.com/activities/citable-code/\">Github release</a>.</p><p>(Note: in this test case, we hook our release with Zenodo sandbox interface to avoid dummy publications, therefore the DOI badge is not valid but the record can be found <a href=\"https://sandbox.zenodo.org/record/257354\">here</a>).</p><strong>Sphinx autobuild (tip)</strong><p>Install:</p><pre><code>$ pip install sphinx-autobuild</code></pre><p>Start autobuild (with live reload):</p><pre><code>$ cd docs ; make livehtml</code></pre>",
"license": "MIT",
"upload_type": "software",
"access_right": "open",
Expand Down
29 changes: 18 additions & 11 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ CI/CD examples to test and deploy python packages from Github

|Docs| |RTD|

|CI| |Coverage| |Github|
|CI| |Github Pages|

|Codecov| |Coveralls|

|PyPI| |PyPI Version| |Python Version|

Expand All @@ -20,12 +22,15 @@ CI/CD examples to test and deploy python packages from Github
.. |CI| image:: https://img.shields.io/travis/seignovert/test-python-docs.svg?logo=travis-ci&logoColor=white
:target: https://travis-ci.org/seignovert/test-python-docs

.. |Coverage| image:: https://img.shields.io/coveralls/github/seignovert/test-python-docs.svg?logo=travis-ci&logoColor=white
:target: https://coveralls.io/github/seignovert/test-python-docs

.. |Github| image:: https://img.shields.io/badge/github.io-test--python--docs-blue.svg?logo=github&logoColor=white
.. |Github Pages| image:: https://img.shields.io/badge/github.io-test--python--docs-blue.svg?logo=github&logoColor=white
:target: https://seignovert.github.io/test-python-docs/

.. |Codecov| image:: https://img.shields.io/codecov/c/github/seignovert/test-python-docs.svg?label=Codecov&logo=codecov&logoColor=white
:target: https://codecov.io/gh/seignovert/test-python-docs

.. |Coveralls| image:: https://img.shields.io/coveralls/github/seignovert/test-python-docs.svg?label=Coveralls
:target: https://coveralls.io/github/seignovert/test-python-docs

.. |PyPI| image:: https://img.shields.io/badge/PyPI%20(test)-foo--autodeploy-blue.svg?logo=python&logoColor=white
:target: https://test.pypi.org/project/foo-autodeploy/

Expand All @@ -52,11 +57,12 @@ CI/CD examples to test and deploy python packages from Github

Python project to showcase how to hook Github with:

- Read the Docs
- Travis CI
- Coveralls.io
- CodeCov
- Coveralls
- PyPI
- Anaconda
- Read the Docs
- Github Pages
- Github Releases
- Zenodo
Expand All @@ -79,9 +85,13 @@ See `tox.ini <tox.ini>`_ to configure:
docstrings in ``foo`` module.
- linter python files syntax (with `flake8`).

See `.readthedocs.yml <.readthedocs.yml>`_
to configure `Read the Docs <https://test-python-docs.readthedocs.io/>`_ deployment.

See `.travis.yml <.travis.yml>`_ to configure CI tests and deployments to:

- `Coveralls.io <https://coveralls.io/github/seignovert/test-python-docs>`_
- `Codecov <https://codecov.io/gh/seignovert/test-python-docs>`_
- `Coveralls <https://coveralls.io/github/seignovert/test-python-docs>`_
- `PyPI (test) <https://test.pypi.org/project/foo-autodeploy/>`_
- `Anaconda <https://anaconda.org/seignovert/foo-autodeploy>`_
- `Github Releases <https://github.com/seignovert/test-python-docs/releases>`_
Expand All @@ -93,9 +103,6 @@ See `recipe/ <recipe/>`_ folder to configure:
- `deploy.sh <recipe/deploy.sh>`_ to install miniconda3,
build and deploy from Travis-CI to Anaconda.

See `.readthedocs.yml <.readthedocs.yml>`_
to configure `Read the Docs <https://test-python-docs.readthedocs.io/>`_ deployment.

See `.zenodo.json <.zenodo.json>`_ to configure
`Zenodo <https://zenodo.org>`_ deployment, to get a DOI for each
`Github release <https://guides.github.com/activities/citable-code/>`_.
Expand Down
16 changes: 13 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[tox]
envlist = py36-{tests,docs}, flake8
envlist = py36-{tests,codecov,coveralls,docs}, flake8

[travis]
python =
3.6: py36

[travis:env]
JOB =
tests: tests
tests: tests, codecov, coveralls
docs: docs
linter: flake8

Expand All @@ -18,6 +18,16 @@ deps =

commands = py.test --cov {envsitepackagesdir}/foo {posargs}

[testenv:py36-codecov]
passenv = CI TRAVIS TRAVIS_*
deps = codecov
commands = codecov

[testenv:py36-coveralls]
passenv = CI TRAVIS TRAVIS_*
deps = python-coveralls
commands = coveralls

[testenv:py36-docs]
skipsdist = True
deps =
Expand All @@ -29,7 +39,7 @@ commands =
sphinx-build docs "{toxworkdir}/docs/_build" --color -W -bhtml {posargs}
sphinx-build docs "{toxworkdir}/docs/_build" --color -W -bdoctest {posargs}

[testenv:flake8]
[testenv:py36-flake8]
basepython = python3
skip_install = true
deps =
Expand Down

0 comments on commit 32ba062

Please sign in to comment.