From d17f9689322d062dcf99241c7039024ba4196be0 Mon Sep 17 00:00:00 2001 From: Andrew Brogdon Date: Fri, 29 Jun 2018 15:49:11 -0700 Subject: [PATCH] Adding Travis config for jsonexample. (#4) --- .travis.yml | 27 +++++++++++++++++++ .../test/{widget_test.dart => main_test.dart} | 2 +- travis_script.sh | 9 +++++++ 3 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 .travis.yml rename jsonexample/test/{widget_test.dart => main_test.dart} (74%) create mode 100644 travis_script.sh diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..188f839f2 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,27 @@ +os: + - linux +sudo: false +addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - libstdc++6 + - fonts-droid +git: + depth: 3 +env: + - FLUTTER_VERSION=beta + - FLUTTER_VERSION=dev +matrix: + allow_failures: + - env: FLUTTER_VERSION=dev +before_script: + - git clone https://github.com/flutter/flutter.git -b $FLUTTER_VERSION + - ./flutter/bin/flutter doctor + - chmod +x travis_script.sh +script: + - ./travis_script.sh +cache: + directories: + - $HOME/shared/.pub-cache diff --git a/jsonexample/test/widget_test.dart b/jsonexample/test/main_test.dart similarity index 74% rename from jsonexample/test/widget_test.dart rename to jsonexample/test/main_test.dart index df84151d3..0fc93b3be 100644 --- a/jsonexample/test/widget_test.dart +++ b/jsonexample/test/main_test.dart @@ -5,5 +5,5 @@ import 'package:flutter_test/flutter_test.dart'; void main() { - testWidgets('Counter increments smoke test', (WidgetTester tester) async {}); + test('This test always passes.', () {}); } diff --git a/travis_script.sh b/travis_script.sh new file mode 100644 index 000000000..52431fa1d --- /dev/null +++ b/travis_script.sh @@ -0,0 +1,9 @@ +set -e + +echo "== Testing 'jsonexample' on Flutter's $FLUTTER_VERSION channel ==" + +pushd jsonexample +../flutter/bin/flutter test +popd + +echo "-- Success --"