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

Commit

Permalink
Getting code coverage to only run on master (#151)
Browse files Browse the repository at this point in the history
* Getting code coverage to only run on master

* Moving scripts into ci dir

* Moving scripts into ci dir
  • Loading branch information
itsjoeconway authored Dec 7, 2016
1 parent 1bc0f7e commit 9dde4e9
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
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

0 comments on commit 9dde4e9

Please sign in to comment.