Show test coverage

Signed-off-by: Chenxiong Qi <cqi@redhat.com>
This commit is contained in:
Chenxiong Qi
2019-09-10 23:02:29 +08:00
parent 47809d530a
commit dd1f918920
5 changed files with 8 additions and 2 deletions

1
.gitignore vendored
View File

@@ -22,3 +22,4 @@ tests/test_module_build_service.db-journal
.pytest_cache/
requirements.txt.orig
mbstest.db
htmlcov/

View File

@@ -49,7 +49,7 @@ RUN yum -y install \
&& yum clean all
# We currently require newer versions of these Python packages for the tests.
# more-itertools is required by pytest, but versions 6.0.0 and up aren't Python 2 compatible
RUN pip install --upgrade flask-sqlalchemy "pytest<5.0" flake8 tox pip "more-itertools<6.0.0"
RUN pip install --upgrade flask-sqlalchemy "pytest<5.0" flake8 tox pip "more-itertools<6.0.0" pytest-cov
VOLUME /src
WORKDIR /src
ENTRYPOINT ["docker/test.sh"]

View File

@@ -30,6 +30,7 @@ RUN dnf -y install \
python3-sqlalchemy \
python3-pungi \
python3-psycopg2 \
python3-pytest-cov \
# Test-only dependencies
python3-pytest \
python3-flake8 \

View File

@@ -1,6 +1,7 @@
-r requirements.txt
flake8
mock
pytest
flake8
pytest-cov
tox

View File

@@ -54,3 +54,6 @@ deps = bandit
commands =
/bin/bash -c "bandit -r -ll $(find . -mindepth 1 -maxdepth 1 ! -name tests ! -name \.\* -type d -o -name \*.py)"
ignore_outcome = True
[pytest]
addopts = --cov module_build_service --cov-report html --cov-report term