Skip to content

update the travis build #24

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

Merged
merged 1 commit into from
Sep 24, 2015
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.buildlog
.DS_Store
.idea
.packages
.pub/
build/
packages
Expand Down
5 changes: 4 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
language: dart
# Speed up builds by using containerization.
sudo: false
env:
global:
# COVERALLS_TOKEN
secure: aTnwsQmp/ngr1eXNVULJekdHhgvQq3PomunMOqeqA+5OY1MpSrdQgMigjT/VdjaMFe6mackHCR7sIhWcsiT2weZItVkeOYckT41ICrogP7bau7GgpcCjntHZ0byYN8MImbo/zJPZG3sh2iZwL2YFx+TjjHHkAbn7RovKeAmhMIM=
dart:
- stable
- dev
script: ./tool/travis.sh
after_success:
- pub global activate dart_coveralls
- pub global run dart_coveralls:dart_coveralls report --exclude-test-files --token $COVERALLS_TOKEN ./test/all_tests.dart
- pub global run dart_coveralls:dart_coveralls report --exclude-test-files --token $COVERALLS_TOKEN ./test/all_tests.dart
1 change: 1 addition & 0 deletions lib/src/util.dart
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ StreamController _createControllerLikeStream({Stream stream, void onListen(), vo
}
}

// TODO: This is not used.
Future _cancelSubscriptions(Iterable<StreamSubscription> subscriptions) {
var futures = subscriptions
.map((subscription) => subscription.cancel())
Expand Down
3 changes: 1 addition & 2 deletions test/debounce_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ library debounce_test;

import 'dart:async';
import 'package:guinness/guinness.dart';
import 'package:unittest/unittest.dart' show expectAsync;
import 'package:stream_transformers/stream_transformers.dart';
import 'util.dart';

Expand Down Expand Up @@ -69,4 +68,4 @@ void testWithStreamController(StreamController provider()) {
var stream = controller.stream.transform(new Debounce(duration));
expect(stream.isBroadcast).toBe(controller.stream.isBroadcast);
});
}
}
3 changes: 1 addition & 2 deletions test/do_action_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ library do_action_test;

import 'dart:async';
import 'package:guinness/guinness.dart';
import 'package:unittest/unittest.dart' show expectAsync;
import 'package:stream_transformers/stream_transformers.dart';
import 'util.dart';

Expand Down Expand Up @@ -88,4 +87,4 @@ void testWithStreamController(StreamController provider()) {
var stream = controller.stream.transform(new DoAction(null));
expect(stream.isBroadcast).toBe(controller.stream.isBroadcast);
});
}
}
3 changes: 1 addition & 2 deletions test/sample_on_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ library sample_on_test;

import 'dart:async';
import 'package:guinness/guinness.dart';
import 'package:unittest/unittest.dart' show expectAsync;
import 'package:stream_transformers/stream_transformers.dart';
import 'util.dart';

Expand Down Expand Up @@ -96,4 +95,4 @@ void testWithStreamController(StreamController provider()) {
var stream = controller.stream.transform(new SampleOn(trigger.stream));
expect(stream.isBroadcast).toBe(controller.stream.isBroadcast);
});
}
}
3 changes: 1 addition & 2 deletions test/sample_periodically_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ library sample_periodically_test;

import 'dart:async';
import 'package:guinness/guinness.dart';
import 'package:unittest/unittest.dart' show expectAsync;
import 'package:stream_transformers/stream_transformers.dart';
import 'util.dart';

Expand Down Expand Up @@ -52,4 +51,4 @@ void testWithStreamController(StreamController provider()) {
var stream = controller.stream.transform(new SampleOn(trigger.stream));
expect(stream.isBroadcast).toBe(controller.stream.isBroadcast);
});
}
}
3 changes: 1 addition & 2 deletions test/scan_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ library scan_test;
import 'dart:async';
import 'package:guinness/guinness.dart';
import 'package:stream_transformers/stream_transformers.dart';
import 'package:unittest/unittest.dart' show expectAsync;
import 'util.dart';

void main() => describe("Scan", () {
Expand Down Expand Up @@ -64,4 +63,4 @@ void testWithStreamController(StreamController provider()) {
var stream = controller.stream.transform(new Scan(0, (a, b) => a + b));
expect(stream.isBroadcast).toBe(controller.stream.isBroadcast);
});
}
}
3 changes: 1 addition & 2 deletions test/start_with_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ library start_with_test;

import 'dart:async';
import 'package:guinness/guinness.dart';
import 'package:unittest/unittest.dart' show expectAsync;
import 'package:stream_transformers/stream_transformers.dart';
import 'util.dart';

Expand Down Expand Up @@ -79,4 +78,4 @@ void testWithStreamController(StreamController provider()) {
var stream = controller.stream.transform(new StartWith(1));
expect(stream.isBroadcast).toBe(controller.stream.isBroadcast);
});
}
}
12 changes: 12 additions & 0 deletions tool/travis.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

# Fast fail the script on failures.
set -e

# Verify that the libraries are error free.
dartanalyzer --fatal-warnings \
lib/stream_transformers.dart \
test/all_tests.dart

# Run the tests.
dart -c test/all_tests.dart