From e29fe23bd9b8fb98c9c01050806ca49ba182b49e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20G=C3=A2teau?= Date: Sun, 1 Dec 2019 19:12:04 +0100 Subject: [PATCH] Hopefully fix coveralls report Run tests from the source tree so that the coverage report points to valid files. --- .gitignore | 9 +++++---- .travis.yml | 13 +++---------- ci/build | 27 +++++++++++++++++++++++++++ 3 files changed, 35 insertions(+), 14 deletions(-) create mode 100755 ci/build diff --git a/.gitignore b/.gitignore index 3b188ab..07919fc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,10 +1,11 @@ tests/manual/html tests/manual/doxygen_sqlite3.db -*.pyc MANIFEST -dist +/dist/ +/build/ +/htmlcov/ +*.pyc .*swp -build .coverage* -htmlcov *.egg-info +/doxyqml-*/ diff --git a/.travis.yml b/.travis.yml index 2e84c87..d79a03e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,18 +11,11 @@ before_install: install: - pip install -r dev-requirements.txt - - pip install coveralls + - pip install python-coveralls script: - - flake8 - - ./setup.py sdist --formats=bztar - - tar xf dist/doxyqml-*.tar.bz2 - - cd doxyqml-* - - ./setup.py install - - tests/run-coverage - # Run functional tests again, but running Doxyqml as a separate process - # instead of as a Python module - - tests/functional/tests.py + - pip install -e . + - ci/build after_success: coveralls diff --git a/ci/build b/ci/build new file mode 100755 index 0000000..740cd80 --- /dev/null +++ b/ci/build @@ -0,0 +1,27 @@ +#!/bin/sh +set -e +cd $(dirname $0)/.. + +log_step() { + echo + echo "=== $@ ===" + echo +} + +log_step "Testing coding style" +flake8 + +log_step "Creating package" +./setup.py sdist --formats=bztar + +log_step "Unpacking package" +tar xf dist/doxyqml-*.tar.bz2 +cd doxyqml-* +./setup.py install + +tests/run-coverage +log_step "Running functional tests" +tests/unit/tests.py + +log_step "Running functional tests (as an external process)" +tests/functional/tests.py --import