ci(coverage): use Codecov and pytest-cov

This commit is contained in:
Rémi Alvergnat
2021-02-10 23:45:21 +01:00
parent 62f0c0ec5d
commit f743298863
4 changed files with 11 additions and 19 deletions

View File

@@ -1,10 +1,8 @@
# .coveragerc to control coverage.py
[run]
include =
guessit/*
omit =
guessit/__version__.py
guessit/test/*
[report]
exclude_lines =
pragma: no cover
pragma: no cover

View File

@@ -53,17 +53,12 @@ jobs:
- name: Test
run: |
pip install coveralls
coverage run --source=guessit setup.py test
pytest --cov=guessit
env:
REBULK_REGEX_ENABLED: ${{ matrix.regex }}
- name: Coveralls
run: |
coveralls
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Codecov
uses: codecov/codecov-action@v1
commitlint:
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
@@ -78,7 +73,7 @@ jobs:
build-setuptools:
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
needs: [ci]
needs: [ ci ]
runs-on: ubuntu-latest
@@ -115,7 +110,7 @@ jobs:
build-bin-linux:
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
needs: [ci]
needs: [ ci ]
runs-on: ubuntu-latest
@@ -156,7 +151,7 @@ jobs:
build-bin-windows:
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
needs: [ci]
needs: [ ci ]
runs-on: windows-latest
@@ -196,7 +191,7 @@ jobs:
build-bin-macos:
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
needs: [ci]
needs: [ ci ]
runs-on: macos-latest
@@ -236,7 +231,7 @@ jobs:
release:
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
needs: [commitlint, build-setuptools, build-bin-linux, build-bin-windows, build-bin-macos]
needs: [ commitlint, build-setuptools, build-bin-linux, build-bin-windows, build-bin-macos ]
runs-on: ubuntu-latest

View File

@@ -1,10 +1,9 @@
GuessIt
=======
[![Latest Version](https://img.shields.io/pypi/v/guessit.svg)](https://pypi.python.org/pypi/guessit)
[![LGPLv3 License](https://img.shields.io/badge/license-LGPLv3-blue.svg)]()
[![Build Status](https://img.shields.io/github/workflow/status/guessit-io/guessit/ci)](https://github.com/guessit-io/guessit/actions?query=workflow%3Aci)
[![Coveralls](https://img.shields.io/coveralls/guessit-io/guessit/master.svg)](https://coveralls.io/github/guessit-io/guessit?branch=master)
[![Codecov](https://img.shields.io/codecov/c/github/guessit-io/guessit)](https://codecov.io/gh/guessit-io/guessit)
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/relekang/python-semantic-release)
GuessIt is a python library that extracts as much information as

View File

@@ -21,7 +21,7 @@ setup_requires = ['pytest-runner']
dev_require = ['tox', 'mkdocs', 'mkdocs-material', 'pyinstaller', 'python-semantic-release']
tests_require = ['pytest', 'pytest-benchmark', 'pylint', 'PyYAML']
tests_require = ['pytest', 'pytest-benchmark', 'pytest-cov', 'pylint', 'PyYAML']
package_data = ['config/*', 'data/*']