Skip to content
This repository has been archived by the owner on Mar 18, 2021. It is now read-only.

Getting code coverage to only run on master #151

Merged
merged 3 commits into from
Dec 7, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,8 @@ before_script:
- psql -c "alter user dart with password 'dart';" -U postgres
- psql -c 'grant all on database dart_test to dart;' -U postgres
- pub get
script:
- pub run test -j 1 -r expanded
- pub global activate -sgit https://github.com/stablekernel/codecov_dart.git
- dart_codecov_generator --report-on=lib/ --verbose --no-html
after_success:
- if [ "$TRAVIS_BRANCH" == "master" ]; then
bash <(curl -s https://codecov.io/bash)
fi
script: sh ci/script.sh
after_success: sh ci/after_script.sh
branches:
only:
- master
Expand Down
5 changes: 5 additions & 0 deletions ci/after_script.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash

if [ "$TRAVIS_BRANCH" == "master" ]; then
bash <(curl -s https://codecov.io/bash)
fi
7 changes: 7 additions & 0 deletions ci/script.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash

pub run test -j 1 -r expanded
if [ "$TRAVIS_BRANCH" == "master" ]; then
pub global activate -sgit https://github.com/stablekernel/codecov_dart.git
dart_codecov_generator --report-on=lib/ --verbose --no-html
fi