API: test coverage on codacy

This commit is contained in:
Sam 2018-05-12 18:21:00 +02:00
parent 3dc7de4a93
commit 59a3ca6a3a
6 changed files with 24 additions and 1 deletions

1
.gitignore vendored
View File

@ -10,6 +10,7 @@ __pycache__
uploads
.cache
.coverage
coverage.xml
# MPWO_CLIENT
###############

View File

@ -48,7 +48,13 @@ test-e2e:
$(NPM) test
test-python:
$(PYTEST) mpwo_api --cov-config .coveragerc --cov=mpwo_api
$(PYTEST) mpwo_api --cov-config .coveragerc --cov=mpwo_api --cov-report term-missing
test-python-xml:
$(PYTEST) mpwo_api --cov-config .coveragerc --cov=mpwo_api --cov-report xml
update-cov:
$(COV) -r coverage.xml
upgrade-db:
$(FLASK) db upgrade --directory $(MIGRATIONS)

View File

@ -19,6 +19,7 @@ PYTHON = $(VENV)/bin/python
PIP = $(VENV)/bin/pip
FLASK = $(VENV)/bin/flask
PYTEST = $(VENV)/bin/py.test
COV = $(VENV)/bin/python-codacy-coverage
# Node env
NODE_MODULES = $(PWD)/mpwo_client/node_modules

View File

@ -1 +1,4 @@
export REACT_APP_THUNDERFOREST_API_KEY=
# for dev env
export CODACY_PROJECT_TOKEN=

View File

@ -4,6 +4,12 @@
[![Flask Version](https://img.shields.io/badge/flask-1.0-brightgreen.svg)](http://flask.pocoo.org/)
[![React Version](https://img.shields.io/badge/react-16.3-brightgreen.svg)](https://reactjs.org/)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/45d64b31e37e4890a239b8298e66a011)](https://www.codacy.com/app/SamR1/mpwo?utm_source=github.com&utm_medium=referral&utm_content=SamR1/mpwo&utm_campaign=badger)
[![Codacy Badge](https://api.codacy.com/project/badge/Coverage/45d64b31e37e4890a239b8298e66a011)](https://www.codacy.com/app/SamR1/mpwo?utm_source=github.com&utm_medium=referral&utm_content=SamR1/mpwo&utm_campaign=Badge_Coverage)<sup>1</sup>
[![Build Status](https://travis-ci.org/SamR1/mpwo.svg?branch=master)](https://travis-ci.org/SamR1/mpwo)
Self hosted workout/activity tracker written with Flask and React (_work in progress_).
---
Notes:
_1. Test coverage: only for Python API_

View File

@ -2,8 +2,11 @@ alembic==0.9.9
apipkg==1.4
attrs==17.4.0
bcrypt==3.1.4
certifi==2018.4.16
cffi==1.11.2
chardet==3.0.4
click==6.7
codacy-coverage==1.3.11
coverage==4.5.1
execnet==1.5.0
flake8==3.5.0
@ -14,6 +17,7 @@ Flask-Bcrypt==0.7.1
Flask-Migrate==2.1.1
Flask-SQLAlchemy==2.3.2
gpxpy==1.2.0
idna==2.6
isort==4.2.15
itsdangerous==0.24
Jinja2==2.10
@ -36,7 +40,9 @@ pytest-isort==0.1.0
pytest-runner==3.0
python-dateutil==2.7.2
python-editor==1.0.3
requests==2.18.4
six==1.11.0
SQLAlchemy==1.2.7
testfixtures==5.3.1
urllib3==1.22
Werkzeug==0.14.1