Skip to content

Commit e7e4414

Browse files
authored
Add FirebaseStorageSwift to GHA CI (#5252)
1 parent 999881c commit e7e4414

File tree

2 files changed

+26
-3
lines changed

2 files changed

+26
-3
lines changed

.github/workflows/storage.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ jobs:
1515
env:
1616
plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
1717
runs-on: macos-latest
18+
strategy:
19+
matrix:
20+
pod: [Storage, StorageSwift]
1821
steps:
1922
- uses: actions/checkout@v2
2023
- name: Setup Bundler
@@ -23,7 +26,7 @@ jobs:
2326
run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/storage-db-plist.gpg \
2427
FirebaseStorage/Tests/Integration/Resources/GoogleService-Info.plist "$plist_secret"
2528
- name: BuildAndTest # can be replaced with pod lib lint with CocoaPods 1.10
26-
run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/build.sh Storage all)
29+
run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/build.sh ${{ matrix.pod }} all)
2730

2831
catalyst:
2932
runs-on: macOS-latest
@@ -64,7 +67,9 @@ jobs:
6467
- name: Setup Bundler
6568
run: scripts/setup_bundler.sh
6669
- name: Build and test
67-
run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseStorage.podspec --skip-tests --platforms=${{ matrix.target }}
70+
run: |
71+
scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseStorage.podspec --skip-tests --platforms=${{ matrix.target }}
72+
scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseStorageSwift.podspec --skip-tests --platforms=${{ matrix.target }}
6873
6974
storage-cron-only:
7075
runs-on: macos-latest
@@ -82,4 +87,6 @@ jobs:
8287
- name: Setup Bundler
8388
run: scripts/setup_bundler.sh
8489
- name: PodLibLint Storage Cron
85-
run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseStorage.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}
90+
run: |
91+
scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseStorage.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}
92+
scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseStorage.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}

scripts/build.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ product can be one of:
3333
Firebase
3434
Firestore
3535
InAppMessaging
36+
Storage
37+
StorageSwift
3638
SymbolCollision
3739
3840
platform can be one of:
@@ -437,6 +439,20 @@ case "$product-$platform-$method" in
437439
build \
438440
test
439441
;;
442+
443+
StorageSwift-*-xcodebuild)
444+
pod_gen FirebaseStorageSwift.podspec --platforms=ios
445+
if check_secrets; then
446+
# Integration tests are only run on iOS to minimize flake failures.
447+
RunXcodebuild \
448+
-workspace 'gen/FirebaseStorageSwift/FirebaseStorageSwift.xcworkspace' \
449+
-scheme "FirebaseStorageSwift-Unit-integration" \
450+
"${ios_flags[@]}" \
451+
"${xcb_flags[@]}" \
452+
build \
453+
test
454+
fi
455+
;;
440456
*)
441457
echo "Don't know how to build this product-platform-method combination" 1>&2
442458
echo " product=$product" 1>&2

0 commit comments

Comments
 (0)