Skip to content

Commit 51ffae2

Browse files
authored
Run Functions Unit Tests on travis (#954)
1 parent 308acc0 commit 51ffae2

File tree

4 files changed

+39
-1
lines changed

4 files changed

+39
-1
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ jobs:
3030
- bundle install
3131
- gem install xcpretty
3232
- ./scripts/if_changed.sh bundle exec pod install --project-directory=Example --repo-update
33+
- ./scripts/if_changed.sh bundle exec pod install --project-directory=Functions/Example
3334
script:
3435
- ./scripts/if_changed.sh ./scripts/build.sh $PROJECT $PLATFORM
3536

Functions/Example/FirebaseFunctions.xcodeproj/xcshareddata/xcschemes/FirebaseFunctions_Tests.xcscheme

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,15 @@
2323
</BuildableReference>
2424
</TestableReference>
2525
</Testables>
26+
<MacroExpansion>
27+
<BuildableReference
28+
BuildableIdentifier = "primary"
29+
BlueprintIdentifier = "6003F589195388D20070C39A"
30+
BuildableName = "FirebaseFunctions_Example.app"
31+
BlueprintName = "FirebaseFunctions_Example"
32+
ReferencedContainer = "container:FirebaseFunctions.xcodeproj">
33+
</BuildableReference>
34+
</MacroExpansion>
2635
<AdditionalOptions>
2736
</AdditionalOptions>
2837
</TestAction>
@@ -36,6 +45,16 @@
3645
debugDocumentVersioning = "YES"
3746
debugServiceExtension = "internal"
3847
allowLocationSimulation = "YES">
48+
<BuildableProductRunnable
49+
runnableDebuggingMode = "0">
50+
<BuildableReference
51+
BuildableIdentifier = "primary"
52+
BlueprintIdentifier = "6003F589195388D20070C39A"
53+
BuildableName = "FirebaseFunctions_Example.app"
54+
BlueprintName = "FirebaseFunctions_Example"
55+
ReferencedContainer = "container:FirebaseFunctions.xcodeproj">
56+
</BuildableReference>
57+
</BuildableProductRunnable>
3958
<AdditionalOptions>
4059
</AdditionalOptions>
4160
</LaunchAction>
@@ -45,6 +64,15 @@
4564
savedToolIdentifier = ""
4665
useCustomWorkingDirectory = "NO"
4766
debugDocumentVersioning = "YES">
67+
<MacroExpansion>
68+
<BuildableReference
69+
BuildableIdentifier = "primary"
70+
BlueprintIdentifier = "6003F589195388D20070C39A"
71+
BuildableName = "FirebaseFunctions_Example.app"
72+
BlueprintName = "FirebaseFunctions_Example"
73+
ReferencedContainer = "container:FirebaseFunctions.xcodeproj">
74+
</BuildableReference>
75+
</MacroExpansion>
4876
</ProfileAction>
4977
<AnalyzeAction
5078
buildConfiguration = "Debug">

scripts/build.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,15 @@ case "$product-$method-$platform" in
111111
"${xcb_flags[@]}" \
112112
build \
113113
test
114+
115+
if [[ $platform == 'iOS' ]]; then
116+
RunXcodebuild \
117+
-workspace 'Functions/Example/FirebaseFunctions.xcworkspace' \
118+
-scheme "FirebaseFunctions_Tests" \
119+
"${xcb_flags[@]}" \
120+
build \
121+
test
122+
fi
114123
;;
115124

116125
Firestore-xcodebuild-iOS)

scripts/if_changed.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ elif [[ -z "$TRAVIS_COMMIT_RANGE" ]]; then
4646
else
4747
case "$PROJECT-$METHOD" in
4848
Firebase-*)
49-
check_changes '^(Firebase|Example)'
49+
check_changes '^(Firebase|Functions|Example)'
5050
;;
5151

5252
Firestore-xcodebuild)

0 commit comments

Comments
 (0)