mirror of
https://github.com/tbabej/taskwiki.git
synced 2025-08-18 21:33:07 +02:00
tests: Fix coverage reporting
Coverage reporting wasn't migrated into the docker container and therefore did nothing at all.
This commit is contained in:
parent
f0cc8b3ba8
commit
7663a58793
4 changed files with 13 additions and 17 deletions
|
@ -1,6 +1,3 @@
|
|||
[report]
|
||||
omit = */python2.7/*,*/test*,*/__init__.py
|
||||
[paths]
|
||||
source =
|
||||
.
|
||||
/root/.vim/bundle/taskwiki
|
||||
[run]
|
||||
source = taskwiki
|
||||
data_file = /tmp/taskwiki-coverage/.coverage
|
||||
|
|
10
.travis.yml
10
.travis.yml
|
@ -8,21 +8,11 @@ env:
|
|||
- TASK_VERSION=v2.4.4
|
||||
- TASK_VERSION=v2.5.0
|
||||
- TASK_VERSION=v2.5.1
|
||||
python:
|
||||
- "3.6"
|
||||
services:
|
||||
- docker
|
||||
install:
|
||||
# Install coverage dependencies
|
||||
- pip install coverage coveralls
|
||||
# Build the docker container
|
||||
- pushd $TRAVIS_BUILD_DIR
|
||||
- docker-compose build --build-arg TASK_VERSION=$TASK_VERSION tests
|
||||
script:
|
||||
- make test
|
||||
after_success:
|
||||
- ls /tmp/taskwiki-coverage
|
||||
- mv /tmp/taskwiki-coverage/.coverage.* . || echo ok
|
||||
- coverage combine
|
||||
- coverage report
|
||||
- coveralls
|
||||
|
|
5
Makefile
5
Makefile
|
@ -8,5 +8,10 @@ test:
|
|||
pytest:
|
||||
$(PYTHON) -m pytest -vv $(PYTEST_FLAGS) tests/
|
||||
|
||||
cover-pytest: pytest
|
||||
coverage combine
|
||||
coverage report
|
||||
if [ "$$TRAVIS" ]; then coveralls; fi
|
||||
|
||||
xvfb-%:
|
||||
xvfb-run --server-args=-noreset $(MAKE) $*
|
||||
|
|
|
@ -8,6 +8,10 @@ services:
|
|||
security_opt:
|
||||
- label=type:container_runtime_t
|
||||
tty: true
|
||||
command: make xvfb-pytest
|
||||
command: make xvfb-cover-pytest
|
||||
environment:
|
||||
PYTEST_FLAGS: "-o cache_dir=/tmp/pytest-cache ${PYTEST_FLAGS:-}"
|
||||
TRAVIS:
|
||||
TRAVIS_JOB_ID:
|
||||
TRAVIS_BRANCH:
|
||||
TRAVIS_PULL_REQUEST:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue