Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit dc7f897

Browse files
authored
Merge pull request rethinkdb#12 from RebirthDB/fix-travis-pr-build
Skip coverage upload on PRs without encrypted key.
2 parents cc1d47d + ac0e468 commit dc7f897

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

Makefile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,7 @@ test-integration:
5151
pytest -m integration
5252

5353
upload-coverage:
54-
pytest -m unit --cov rebirthdb --cov-report xml
55-
python-codacy-coverage -r coverage.xml
54+
@sh scripts/upload-coverage.sh
5655

5756
clean:
5857
@rm -rf \
@@ -77,4 +76,3 @@ package: prepare
7776

7877
publish:
7978
cd ${BUILD_DIR} && python ./setup.py register upload
80-

scripts/upload-coverage.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
if [ "${TRAVIS_PULL_REQUEST}" != "" ]; then
2+
if [ "${CODACY_PROJECT_TOKEN}" = "" ]; then
3+
echo "Skipping coverage upload for PR or missing CODACY_PROJECT_TOKEN"
4+
exit;
5+
fi
6+
fi
7+
pytest -m unit --cov rebirthdb --cov-report xml
8+
python-codacy-coverage -r coverage.xml

0 commit comments

Comments
 (0)