From 3dd2a425cd3ddc36b8ba4795272ef9745cd95522 Mon Sep 17 00:00:00 2001 From: Leo Farias Date: Thu, 26 Dec 2019 16:12:01 -0500 Subject: [PATCH 1/2] Added conditional for tests for dart packages Conditional for non-flutter packages. --- entrypoint.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index d9b0321..b161a9d 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -30,8 +30,13 @@ run_test_if_needed() { echo 'Skip test' else echo "Run test" - flutter pub get - flutter test + if "${INPUT_FLUTTER_PACKAGE}"; then + flutter pub get + flutter test + else + pub get + pub test + fi fi } From de2fcf27f79bfb2cdfe52d3791526e6132507ad0 Mon Sep 17 00:00:00 2001 From: Leo Farias Date: Fri, 27 Dec 2019 09:27:46 -0500 Subject: [PATCH 2/2] Update entrypoint.sh --- entrypoint.sh | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index b161a9d..37733a6 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -25,17 +25,26 @@ EOF echo "OK" } +test_dart() { + echo "Run test for dart" + pub get + pub test +} + +test_flutter() { + echo "Run test for flutter" + flutter pub get + flutter test +} + run_test_if_needed() { if "${INPUT_SKIP_TEST}"; then echo 'Skip test' else - echo "Run test" if "${INPUT_FLUTTER_PACKAGE}"; then - flutter pub get - flutter test + test_flutter() else - pub get - pub test + test_dart() fi fi }