-
Notifications
You must be signed in to change notification settings - Fork 78
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
Showing
3 changed files
with
40 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,6 @@ | ||
language: dart | ||
sudo: false | ||
dart: | ||
- dev | ||
- stable | ||
script: ./tool/travis.sh |
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,15 @@ | ||
#!/bin/sh | ||
|
||
dart_files=$(git ls-tree --name-only --full-tree -r HEAD | grep '.dart$') | ||
[ -z "$dart_files" ] && exit 0 | ||
|
||
unformatted=$(dartfmt -n $dart_files) | ||
[ -z "$unformatted" ] && exit 0 | ||
|
||
# Some files are not dartfmt'd. Print message and fail. | ||
echo >&2 "dart files must be formatted with dartfmt. Please run:" | ||
for fn in $unformatted; do | ||
echo >&2 " dartfmt -w $PWD/$fn" | ||
done | ||
|
||
exit 1 |
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,19 @@ | ||
#!/bin/bash | ||
|
||
# Fast fail the script on failures. | ||
set -e | ||
|
||
$(dirname -- "$0")/ensure_dartfmt.sh | ||
|
||
# Run the tests. | ||
dart --checked test/test_all.dart | ||
|
||
# Install dart_coveralls; gather and send coverage data. | ||
if [ "$COVERALLS_TOKEN" ] && [ "$TRAVIS_DART_VERSION" = "stable" ]; then | ||
pub global activate dart_coveralls | ||
pub global run dart_coveralls report \ | ||
--token $COVERALLS_TOKEN \ | ||
--retry 2 \ | ||
--exclude-test-files \ | ||
test/test_all.dart | ||
fi |