forked from openedx-unsupported/edx-analytics-data-api
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Ben Patterson
committed
Feb 10, 2015
1 parent
9b75ed3
commit 6b6c067
Showing
1 changed file
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/usr/bin/env bash | ||
|
||
# | ||
# This script will report various coverage metrics to datadog. | ||
# | ||
# | ||
|
||
if [ "${TRAVIS_BRANCH}" = "master" ] && [ "${TRAVIS_PULL_REQUEST}" = "false" ] && [ -n "${DATADOG_API_KEY}" ] | ||
|
||
then | ||
echo "Reporting coverage stats to datadog" | ||
git clone https://github.com/wedaly/test-metrics | ||
|
||
cd test-metrics | ||
virtualenv venv | ||
source ./venv/bin/activate | ||
pip install -q -r requirements.txt | ||
|
||
cat > unit_test_groups.json <<END | ||
{ | ||
"unit.analytics_data_api": "analytics_data_api/*.py" | ||
} | ||
END | ||
|
||
python -m metrics.coverage unit_test_groups.json `find ../build -name "coverage.xml"` | ||
|
||
deactivate | ||
|
||
else | ||
echo "Note: Not reporting stats to datadog. Those are only reported for builds on master, \ | ||
and when the datadog api key is available." | ||
|
||
fi |