Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: let travis build with dev channel of dart #72

Merged
merged 5 commits into from
Apr 14, 2018
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
13 changes: 1 addition & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
language: dart
dist: trusty
sudo: false

addons:
firefox: 53.0.3
apt:
packages:
- google-chrome-stable

dart:
- dev
- stable
- 1.23.0
- 1.22.0
Expand All @@ -26,7 +19,3 @@ script: ./build.sh
branches:
only:
- master

cache:
directories:
- $HOME/.pub-cache
33 changes: 19 additions & 14 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,18 @@
set -e

echo "Analyzing with `dartanalyzer --version`"
dartanalyzer --strong --fatal-warnings lib/*.dart test/*.dart
dartanalyzer="dartanalyzer --strong --fatal-warnings lib/*.dart test/*.dart"
if [ "$TRAVIS_DART_VERSION" = "dev" ]; then
dartanalyzer="$dartanalyzer --preview-dart-2"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just fyi, at this point, --preview-dart-2 to the analyzer is the same as --strong plus supporting optional new and const.

fi
$dartanalyzer

pub deps

# run the tests
pub run test

# Assert that code is formatted.
# Only run with the stable version of dart.
if [ "$TRAVIS_DART_VERSION" = "stable" ]; then
pub global activate dart_style
dirty_code=$(pub global run dart_style:format --dry-run lib/ test/ example/)
Expand All @@ -17,20 +26,16 @@ if [ "$TRAVIS_DART_VERSION" = "stable" ]; then
else
echo All Dart source files are formatted.
fi
fi

# run the tests
pub run test
# Install dart_coveralls; gather and send coverage data.
if [ "$COVERALLS_TOKEN" ]; then
pub global activate dart_coveralls
pub global run dart_coveralls report \
--retry 2 \
--exclude-test-files \
test/mustache_all.dart
fi

# 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 \
--retry 2 \
--exclude-test-files \
test/mustache_all.dart
fi

if [ "$TRAVIS_DART_VERSION" = "stable" ]; then
pub run test -p chrome,firefox
fi
2 changes: 1 addition & 1 deletion lib/src/tokens.dart
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ class _StartSectionToken extends _ExpressionToken
return str.toString();
}

forEachUntilEndSection(void f(Token)) {
forEachUntilEndSection(void f(Token token)) {
if (f == null) {
throw new Exception('Can not apply a null function!');
}
Expand Down
3 changes: 2 additions & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ homepage: https://github.com/valotas/mustache4dart
environment:
sdk: '>=0.8.10+6 <2.0.0'
dev_dependencies:
test: '>=0.12.0 <0.13.0'
test: '>=0.12.0 <0.12.23'
isolate: '>=1.0.0 <1.1.0'