From 51ffae2650e35ee63a313d6fd5ed558024a72317 Mon Sep 17 00:00:00 2001 From: Paul Beusterien Date: Wed, 21 Mar 2018 08:16:26 -0700 Subject: Run Functions Unit Tests on travis (#954) --- .travis.yml | 1 + .../xcschemes/FirebaseFunctions_Tests.xcscheme | 28 ++++++++++++++++++++++ scripts/build.sh | 9 +++++++ scripts/if_changed.sh | 2 +- 4 files changed, 39 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 178b318..c907873 100644 --- a/.travis.yml +++ b/.travis.yml @@ -30,6 +30,7 @@ jobs: - bundle install - gem install xcpretty - ./scripts/if_changed.sh bundle exec pod install --project-directory=Example --repo-update + - ./scripts/if_changed.sh bundle exec pod install --project-directory=Functions/Example script: - ./scripts/if_changed.sh ./scripts/build.sh $PROJECT $PLATFORM diff --git a/Functions/Example/FirebaseFunctions.xcodeproj/xcshareddata/xcschemes/FirebaseFunctions_Tests.xcscheme b/Functions/Example/FirebaseFunctions.xcodeproj/xcshareddata/xcschemes/FirebaseFunctions_Tests.xcscheme index 26063f9..2380cb8 100644 --- a/Functions/Example/FirebaseFunctions.xcodeproj/xcshareddata/xcschemes/FirebaseFunctions_Tests.xcscheme +++ b/Functions/Example/FirebaseFunctions.xcodeproj/xcshareddata/xcschemes/FirebaseFunctions_Tests.xcscheme @@ -23,6 +23,15 @@ + + + + @@ -36,6 +45,16 @@ debugDocumentVersioning = "YES" debugServiceExtension = "internal" allowLocationSimulation = "YES"> + + + + @@ -45,6 +64,15 @@ savedToolIdentifier = "" useCustomWorkingDirectory = "NO" debugDocumentVersioning = "YES"> + + + + diff --git a/scripts/build.sh b/scripts/build.sh index df3faae..8841dc9 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -111,6 +111,15 @@ case "$product-$method-$platform" in "${xcb_flags[@]}" \ build \ test + + if [[ $platform == 'iOS' ]]; then + RunXcodebuild \ + -workspace 'Functions/Example/FirebaseFunctions.xcworkspace' \ + -scheme "FirebaseFunctions_Tests" \ + "${xcb_flags[@]}" \ + build \ + test + fi ;; Firestore-xcodebuild-iOS) diff --git a/scripts/if_changed.sh b/scripts/if_changed.sh index 616eebb..08ca96d 100755 --- a/scripts/if_changed.sh +++ b/scripts/if_changed.sh @@ -46,7 +46,7 @@ elif [[ -z "$TRAVIS_COMMIT_RANGE" ]]; then else case "$PROJECT-$METHOD" in Firebase-*) - check_changes '^(Firebase|Example)' + check_changes '^(Firebase|Functions|Example)' ;; Firestore-xcodebuild) -- cgit v1.2.3