Browse Source

Show coverage reports in travis-ci builds

Ideally we would extract that report and post it somewhere.  That is
left as future work.

Signed-off-by: Niels Thykier <niels@thykier.net>
devuan-deployment
Niels Thykier 4 years ago
parent
commit
4eb5bdb396
2 changed files with 13 additions and 5 deletions
  1. +7
    -5
      .travis.yml
  2. +6
    -0
      ci/britney-coverage.sh

+ 7
- 5
.travis.yml View File

@@ -2,19 +2,21 @@ language: c
sudo: required
dist: trusty
before_install:
# maybe add php ppa to provide sufficient pkg-php-tools
# - sudo add-apt-repository -y ppa:ondrej/php5
# update package list
- sudo apt-get update -qq
- git clone https://anonscm.debian.org/git/collab-maint/britney2-tests.git britney2-tests
- git clone https://anonscm.debian.org/git/collab-maint/britney-tests-live-data.git britney2-tests/live-data
- rm -f .coverage

install:
# install build dependencies
- sudo apt-get install -qq --no-install-recommends python3 python3-apt python3-yaml rsync libclass-accessor-perl
- sudo apt-get install -qq --no-install-recommends python3 python3-apt python3-yaml python3-coverage rsync libclass-accessor-perl

script:
- britney2-tests/bin/runtests ./britney.py britney2-tests/t test-out
- britney2-tests/bin/runtests ./britney.py britney2-tests/live-data test-out-live-data
- britney2-tests/bin/runtests ./ci/britney-coverage.sh britney2-tests/t test-out
- britney2-tests/bin/runtests ./britney.py britney2-tests/live-data test-out-live-data
after_success:
- python3-coverage report
- python3-coverage report -m
#notifications:
# email: false

+ 6
- 0
ci/britney-coverage.sh View File

@@ -0,0 +1,6 @@
#!/bin/sh

# This script is used on (e.g.) Travis CI to collect coverage

dir=$(dirname "$(dirname "$0")")
exec python3-coverage run --omit '*/yaml/*.py' --branch --append "$dir/britney.py" "$@"

Loading…
Cancel
Save