Devon Carew | 26ceabe | 2014-12-11 11:44:53 -0800 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | # Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 4 | # for details. All rights reserved. Use of this source code is governed by a |
| 5 | # BSD-style license that can be found in the LICENSE file. |
| 6 | |
| 7 | # Fast fail the script on failures. |
| 8 | set -e |
| 9 | |
Devon Carew | 26ceabe | 2014-12-11 11:44:53 -0800 | [diff] [blame] | 10 | # Verify that the libraries are error free. |
Devon Carew | bc1b778 | 2018-07-16 07:01:42 -0700 | [diff] [blame] | 11 | dartanalyzer --fatal-warnings . |
Devon Carew | 26ceabe | 2014-12-11 11:44:53 -0800 | [diff] [blame] | 12 | |
| 13 | # Run the tests. |
Devon Carew | 4bf0815 | 2018-06-21 18:57:25 -0700 | [diff] [blame] | 14 | dart --enable-asserts test/all.dart |
Devon Carew | 823bd7d | 2015-02-10 10:31:46 -0800 | [diff] [blame] | 15 | |
Devon Carew | b1fa88f | 2014-12-21 08:48:52 -0800 | [diff] [blame] | 16 | # Measure the size of the compiled JS, for the dart:html version of the library. |
Devon Carew | 167561c | 2016-03-09 17:31:46 -0800 | [diff] [blame] | 17 | dart tool/grind.dart build |
Devon Carew | b1fa88f | 2014-12-21 08:48:52 -0800 | [diff] [blame] | 18 | |
Devon Carew | 55ee303 | 2014-12-16 15:47:11 -0800 | [diff] [blame] | 19 | # Install dart_coveralls; gather and send coverage data. |
Devon Carew | ec65487 | 2014-12-18 11:16:19 -0800 | [diff] [blame] | 20 | if [ "$REPO_TOKEN" ]; then |
Devon Carew | ec65487 | 2014-12-18 11:16:19 -0800 | [diff] [blame] | 21 | pub global activate dart_coveralls |
Devon Carew | 9dcc074 | 2014-12-31 10:11:29 -0800 | [diff] [blame] | 22 | pub global run dart_coveralls report \ |
| 23 | --token $REPO_TOKEN \ |
| 24 | --retry 2 \ |
| 25 | --exclude-test-files \ |
| 26 | test/all.dart |
Devon Carew | ec65487 | 2014-12-18 11:16:19 -0800 | [diff] [blame] | 27 | fi |