Py package: pytest-cov. Upload test coverage to codecov.

This commit is contained in:
2020-02-18 21:21:23 +01:00
parent b8f9ddbbf4
commit abe4b5745c
2 changed files with 20 additions and 9 deletions

View File

@@ -11,22 +11,32 @@ steps:
- name: test-python3.6 - name: test-python3.6
image: python:3.6-alpine image: python:3.6-alpine
commands: commands:
- python --version - python --version
- pip install -r requirements.txt - pip install -r requirements.txt
- py.test test - py.test test
- name: test-python3.8 - name: test-python3.8
image: python:3.8-alpine image: python:3.8-alpine
commands: commands:
- python --version - python --version
- pip install -r requirements.txt - pip install -r requirements.txt
- py.test test - py.test test
- name: codecov
image: python3:6-alpine
environment:
CODECOV_TOKEN:
from_secret: CODECOV_TOKEN
commands:
- py.test --cov-report=xml --cov=src test
- pip install codecov
- codecov -t
trigger: trigger:
branch: branch:
- master - master
event: event:
include: include:
- pull_request - pull_request
- push - push

View File

@@ -6,3 +6,4 @@ click>=6.7
langdetect>=1.0.7 langdetect>=1.0.7
titlecase>=0.12.0 titlecase>=0.12.0
pytest>=5.3.5 pytest>=5.3.5
pytest-cov>=2.8.1