#!/bin/bash

# Fast fail the script on failures.
set -e

# Run the tests.
dart --checked test/runner.dart

# If the COVERALLS_TOKEN token is set on travis
# Install dart_coveralls
# Rerun tests with coverage and send to coveralls
if [ "$COVERALLS_TOKEN" ]; then
  pub global activate dart_coveralls 0.1.11
  pub global run dart_coveralls report \
    --token $COVERALLS_TOKEN \
    --retry 2 \
    --throw-on-error \
    --debug \
    test/runner.dart
fi

#!/bin/bash

# Fast fail the script on failures.
set -e

# Run the tests.
dart --checked test/runner.dart

# If the COVERALLS_TOKEN token is set on travis
# Install dart_coveralls
# Rerun tests with coverage and send to coveralls
if [ "$COVERALLS_TOKEN" ]; then
  pub global activate dart_coveralls
  pub global run dart_coveralls report \
    --token $COVERALLS_TOKEN \
    --retry 10 \
    --throw-on-error \
    --debug \
    test/runner.dart
fi

Use new version and increase retries
chore(coveralls): Use new version and increase retries
