cabot/bin/test_with_coverage
Jean-Fred Berthelot a68c2f6b5d Add test coverage support
- Split out requirements in two files
  (testing and main)

- Add Bash script running test with coverage

- Add .coveragerc configuration file,
  including Django coverage plugin

- Add post-build to Travis script running CodeCov
2016-12-22 11:09:43 +00:00

15 lines
329 B
Bash

#!/bin/bash
set -x
output_dir='test-results'
mkdir -p $output_dir
coverage run --source="./cabot/" manage.py test
status=$?
coverage report --omit="cabot/cabotapp/tests*"
coverage xml --omit="cabot/cabotapp/tests*" -o $output_dir/coverage.xml
coverage html --omit="cabot/cabotapp/tests*" -d $output_dir/htmlcov/
exit $status