Commit a44d3b7f authored by Adam Barth's avatar Adam Barth Committed by GitHub

Shard Travis job into three pieces (#8232)

parent a55a745c
...@@ -8,8 +8,11 @@ addons: ...@@ -8,8 +8,11 @@ addons:
- libstdc++6 - libstdc++6
- fonts-droid - fonts-droid
install: install:
- gem install coveralls-lcov - ./dev/bots/travis_install.sh
- npm install -g firebase-tools@">=3.0.4 <3.1.0" env:
- SHARD=analyze
- SHARD=tests
- SHARD=docs
before_script: before_script:
- ./dev/bots/travis_setup.sh - ./dev/bots/travis_setup.sh
script: script:
......
...@@ -13,11 +13,23 @@ String flutterTestArgs = Platform.environment['FLUTTER_TEST_ARGS']; ...@@ -13,11 +13,23 @@ String flutterTestArgs = Platform.environment['FLUTTER_TEST_ARGS'];
/// script using FLUTTER_TEST_ARGS=--local-engine=host_debug_unopt to /// script using FLUTTER_TEST_ARGS=--local-engine=host_debug_unopt to
/// use your own build of the engine. /// use your own build of the engine.
Future<Null> main() async { Future<Null> main() async {
if (Platform.environment['SHARD'] == 'docs') {
print('\x1B[32mDONE: test.dart does nothing in the docs shard.\x1B[0m');
} else if (Platform.environment['SHARD'] == 'analyze') {
// Analyze all the Dart code in the repo. // Analyze all the Dart code in the repo.
await _runFlutterAnalyze(flutterRoot, await _runFlutterAnalyze(flutterRoot,
options: <String>['--flutter-repo'], options: <String>['--flutter-repo'],
); );
await _runCmd(dart, <String>[p.join(flutterRoot, 'dev', 'tools', 'mega_gallery.dart')],
workingDirectory: flutterRoot,
);
await _runFlutterAnalyze(p.join(flutterRoot, 'dev', 'benchmarks', 'mega_gallery'),
options: <String>['--watch', '--benchmark'],
);
print('\x1B[32mDONE: Analysis successful.\x1B[0m');
} else {
// Verify that the tests actually return failure on failure and success on success. // Verify that the tests actually return failure on failure and success on success.
String automatedTests = p.join(flutterRoot, 'dev', 'automated_tests'); String automatedTests = p.join(flutterRoot, 'dev', 'automated_tests');
await _runFlutterTest(automatedTests, await _runFlutterTest(automatedTests,
...@@ -77,14 +89,8 @@ Future<Null> main() async { ...@@ -77,14 +89,8 @@ Future<Null> main() async {
await _runFlutterTest(p.join(flutterRoot, 'examples', 'stocks')); await _runFlutterTest(p.join(flutterRoot, 'examples', 'stocks'));
await _runFlutterTest(p.join(flutterRoot, 'examples', 'flutter_gallery')); await _runFlutterTest(p.join(flutterRoot, 'examples', 'flutter_gallery'));
await _runCmd(dart, <String>[p.join(flutterRoot, 'dev', 'tools', 'mega_gallery.dart')],
workingDirectory: flutterRoot,
);
await _runFlutterAnalyze(p.join(flutterRoot, 'dev', 'benchmarks', 'mega_gallery'),
options: <String>['--watch', '--benchmark'],
);
print('\x1B[32mDONE: All tests successful.\x1B[0m'); print('\x1B[32mDONE: All tests successful.\x1B[0m');
}
} }
Future<Null> _runCmd(String executable, List<String> arguments, { Future<Null> _runCmd(String executable, List<String> arguments, {
......
#!/bin/bash
set -ex
if [ -n "$TRAVIS" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
- gem install coveralls-lcov
- npm install -g firebase-tools@">=3.0.4 <3.1.0"
fi
...@@ -17,5 +17,7 @@ if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "$TRAVIS_BRANCH" = "master" ] && [ ...@@ -17,5 +17,7 @@ if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "$TRAVIS_BRANCH" = "master" ] && [
(cd packages/flutter && coveralls-lcov coverage/lcov.info) (cd packages/flutter && coveralls-lcov coverage/lcov.info)
fi fi
# generate the API docs, upload them if [ "$SHARD" = "docs" ]; then
./dev/bots/docs.sh # generate the API docs, upload them
./dev/bots/docs.sh
fi
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment