Add codecov support

This commit is contained in:
Christoph Reiter 2017-08-10 13:29:55 +02:00
parent b906f9c324
commit f9cd77744f
5 changed files with 28 additions and 11 deletions

View File

@ -18,13 +18,14 @@ init:
install:
- bash -xlc "pacman --noconfirm -S --needed mingw-w64-%MSYS2_ARCH%-cairo mingw-w64-%MSYS2_ARCH%-%PYTHON% mingw-w64-%MSYS2_ARCH%-%PYTHON%-pip"
- bash -xlc "%PYTHON% -m pip install pytest"
- bash -xlc "%PYTHON% -m pip install pytest coverage codecov"
build_script:
- set CHERE_INVOKING=yes
- set CFLAGS=-std=c90 -Wall -Wno-long-long -Werror
- set CFLAGS=-std=c90 -Wall -Wno-long-long -Werror -coverage
- cd %APPVEYOR_BUILD_FOLDER%
- bash -xlc "%PYTHON% setup.py test"
- bash -xlc "%PYTHON% -m coverage run --branch setup.py test"
- bash -xlc "%PYTHON% -m codecov"
- bash -xlc "%PYTHON% setup.py sdist"
- bash -xlc "%PYTHON% -m pip install dist/*"

View File

@ -4,22 +4,22 @@ matrix:
dist: trusty
language: python
python: "2.7"
env: CFLAGS="-std=c90 -pedantic -Wno-long-long -Werror"
env: CFLAGS="-std=c90 -pedantic -Wno-long-long -Werror -coverage"
- os: linux
dist: trusty
language: python
python: "3.3"
env: CFLAGS="-std=c90 -pedantic -Wno-long-long -Werror"
env: CFLAGS="-std=c90 -pedantic -Wno-long-long -Werror -coverage"
- os: linux
dist: trusty
language: python
python: "3.4"
env: CFLAGS="-std=c90 -pedantic -Wno-long-long -Werror"
env: CFLAGS="-std=c90 -pedantic -Wno-long-long -Werror -coverage"
- os: linux
dist: trusty
language: python
python: "3.5"
env: CFLAGS="-std=c90 -pedantic -Wno-long-long -Werror"
env: CFLAGS="-std=c90 -pedantic -Wno-long-long -Werror -coverage"
- os: linux
dist: trusty
language: python
@ -27,11 +27,11 @@ matrix:
- os: osx
osx_image: xcode6.4
language: generic
env: PYVER="3" CFLAGS="-std=c90 -pedantic -Wno-long-long -Werror"
env: PYVER="3" CFLAGS="-std=c90 -pedantic -Wno-long-long -Werror -coverage"
- os: osx
osx_image: xcode6.4
language: generic
env: PYVER="2" CFLAGS="-std=c90 -pedantic -Wno-long-long -Werror"
env: PYVER="2" CFLAGS="-std=c90 -pedantic -Wno-long-long -Werror -coverage"
install:
@ -46,10 +46,11 @@ install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]] && [[ "$PYVER" == "3" ]]; then virtualenv ../venv -p python3; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then source ../venv/bin/activate; fi
- python -m pip install --upgrade setuptools
- python -m pip install --upgrade pytest flake8 sphinx sphinx_rtd_theme
- python -m pip install --upgrade pytest flake8 sphinx sphinx_rtd_theme coverage codecov
script:
- python setup.py test
- python -m coverage run --branch setup.py test
- python -m codecov
- python -m flake8 .
- python setup.py sdist
- python -m pip install "$(eval 'echo dist/*')"

View File

@ -36,3 +36,6 @@ For more information visit https://pycairo.readthedocs.io
.. image:: https://ci.appveyor.com/api/projects/status/9hurdbb19lg2i9xm/branch/master?svg=true
:target: https://ci.appveyor.com/project/lazka/pycairo/branch/master
.. image:: https://codecov.io/gh/pygobject/pycairo/branch/master/graph/badge.svg
:target: https://codecov.io/gh/pygobject/pycairo

7
codecov.yml Normal file
View File

@ -0,0 +1,7 @@
comment: false
coverage:
status:
project: false
patch: false
changes: false

View File

@ -1,3 +1,8 @@
[flake8]
ignore=E402
builtins=buffer
[coverage:run]
include=
cairo/*
tests/*