Skip to content

Commit 79627a2

Browse files
authored
Add Swift integration tests to macOS and tvOS builds (#3336)
* Add deployment_targets for macOS and tvOS in FirebaseFirestoreSwift * Add FirebaseFirestoreSwift as a dependency to all integration tests * Add swift integration tests to sync_project.rb
1 parent 3b49631 commit 79627a2

File tree

4 files changed

+10
-1
lines changed

4 files changed

+10
-1
lines changed

FirebaseFirestoreSwift.podspec

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ Google Cloud Firestore is a NoSQL document database built for automatic scaling,
2323

2424
s.swift_version = '4.0'
2525
s.ios.deployment_target = '8.0'
26+
s.osx.deployment_target = '10.11'
27+
s.tvos.deployment_target = '10.0'
2628

2729
s.cocoapods_version = '>= 1.4.0'
2830
s.static_framework = true

Firestore/Example/Firestore.xcodeproj/project.pbxproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@
8888
198F193BD9484E49375A7BE7 /* FSTHelpers.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5492E03A2021401F00B64F25 /* FSTHelpers.mm */; };
8989
1C19D796DB6715368407387A /* annotations.pb.cc in Sources */ = {isa = PBXBuildFile; fileRef = 618BBE9520B89AAC00B5BCE7 /* annotations.pb.cc */; };
9090
1C7254742A9F6F7042C9D78E /* FSTEventAccumulator.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5492E0392021401F00B64F25 /* FSTEventAccumulator.mm */; };
91+
1C79AE3FBFC91800E30D092C /* CodableIntegrationTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 124C932B22C1642C00CA8C2D /* CodableIntegrationTests.swift */; };
9192
1CAA9012B25F975D445D5978 /* strerror_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 358C3B5FE573B1D60A4F7592 /* strerror_test.cc */; };
9293
1CC9BABDD52B2A1E37E2698D /* mutation_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = C8522DE226C467C54E6788D8 /* mutation_test.cc */; };
9394
1DFAEEE901B4E517A4CB9CAD /* FSTMemoryMutationQueueTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5492E0972021552C00B64F25 /* FSTMemoryMutationQueueTests.mm */; };
@@ -582,6 +583,7 @@
582583
CD78EEAA1CD36BE691CA3427 /* hashing_test_apple.mm in Sources */ = {isa = PBXBuildFile; fileRef = B69CF3F02227386500B281C8 /* hashing_test_apple.mm */; };
583584
CE222EAE5BD7D4CDEA8528BF /* objc_class_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = B3CC6B2ACFDC873F06AE9E3F /* objc_class_test.cc */; };
584585
CEDDC6DB782989587D0139B2 /* datastore_test.mm in Sources */ = {isa = PBXBuildFile; fileRef = 546854A820A36867004BDBD5 /* datastore_test.mm */; };
586+
CF5DE1ED21DD0A9783383A35 /* CodableIntegrationTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 124C932B22C1642C00CA8C2D /* CodableIntegrationTests.swift */; };
585587
D063F56AC89E074F9AB05DD3 /* FSTRemoteDocumentCacheTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5492E09C2021552D00B64F25 /* FSTRemoteDocumentCacheTests.mm */; };
586588
D22B96C19A0F3DE998D4320C /* delayed_constructor_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = D0A6E9136804A41CEC9D55D4 /* delayed_constructor_test.cc */; };
587589
D44DA2F61B854E8771E4E446 /* memory_index_manager_test.mm in Sources */ = {isa = PBXBuildFile; fileRef = 73F1F7392210F3D800E1F692 /* memory_index_manager_test.mm */; };
@@ -3366,6 +3368,7 @@
33663368
isa = PBXSourcesBuildPhase;
33673369
buildActionMask = 2147483647;
33683370
files = (
3371+
1C79AE3FBFC91800E30D092C /* CodableIntegrationTests.swift in Sources */,
33693372
95ED06D2B0078D3CDB821B68 /* FIRArrayTransformTests.mm in Sources */,
33703373
EC160876D8A42166440E0B53 /* FIRCursorTests.mm in Sources */,
33713374
EA38690795FBAA182A9AA63E /* FIRDatabaseTests.mm in Sources */,
@@ -3396,6 +3399,7 @@
33963399
isa = PBXSourcesBuildPhase;
33973400
buildActionMask = 2147483647;
33983401
files = (
3402+
CF5DE1ED21DD0A9783383A35 /* CodableIntegrationTests.swift in Sources */,
33993403
660E99DEDA0A6FC1CCB200F9 /* FIRArrayTransformTests.mm in Sources */,
34003404
A55266E6C986251D283CE948 /* FIRCursorTests.mm in Sources */,
34013405
7DD67E9621C52B790E844B16 /* FIRDatabaseTests.mm in Sources */,

Firestore/Example/Podfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ target 'Firestore_Example_macOS' do
9393
target 'Firestore_IntegrationTests_macOS' do
9494
inherit! :search_paths
9595

96+
pod 'FirebaseFirestoreSwift', :path => '../../'
9697
pod 'GoogleTest', :podspec => 'GoogleTest.podspec'
9798

9899
pod 'OCMock'
@@ -123,6 +124,7 @@ target 'Firestore_Example_tvOS' do
123124
target 'Firestore_IntegrationTests_tvOS' do
124125
inherit! :search_paths
125126

127+
pod 'FirebaseFirestoreSwift', :path => '../../'
126128
pod 'GoogleTest', :podspec => 'GoogleTest.podspec'
127129

128130
pod 'OCMock'

scripts/sync_project.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ def sync_firestore(test_only)
183183
'Firestore/Example/Tests/Util/FSTIntegrationTestCase.mm',
184184
'Firestore/Example/Tests/Util/XCTestCase+Await.mm',
185185
'Firestore/Example/Tests/en.lproj/InfoPlist.strings',
186+
'Firestore/Swift/Tests/Integration/**',
186187
'Firestore/core/test/firebase/firestore/testutil/**',
187188
]
188189
t.xcconfig = xcconfig_objc + xcconfig_swift
@@ -318,7 +319,7 @@ def each_target_file(target)
318319

319320
class Syncer
320321
HEADERS = %w{.h}
321-
SOURCES = %w{.c .cc .m .mm}
322+
SOURCES = %w{.c .cc .m .mm .swift}
322323

323324
def initialize(project, root_dir)
324325
@project = project

0 commit comments

Comments
 (0)