Skip to content

Commit 724caed

Browse files
authored
Run unit tests from pod lib lint (#7872)
1 parent 1dbc0ed commit 724caed

File tree

2 files changed

+26
-31
lines changed

2 files changed

+26
-31
lines changed

.github/workflows/storage.yml

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,14 +117,17 @@ jobs:
117117
# watchos is disabled since pod lib lint cannot handle test Auth dep even if the dep is only
118118
# specified for the other three platforms.
119119
target: [ios, tvos, macos]
120+
spec: [
121+
'FirebaseStorage.podspec --test-specs=unit', # The integration tests need more set up.
122+
'FirebaseStorageSwift.podspec --skip-tests' # No current unit tests.
123+
]
120124
steps:
121125
- uses: actions/checkout@v2
122126
- name: Setup Bundler
123127
run: scripts/setup_bundler.sh
124128
- name: Build and test
125129
run: |
126-
scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseStorage.podspec --skip-tests --platforms=${{ matrix.target }}
127-
scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseStorageSwift.podspec --skip-tests --platforms=${{ matrix.target }}
130+
scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb ${{ matrix.spec }} --platforms=${{ matrix.target }}
128131
129132
storage-cron-only:
130133
# Don't run on private repo.
@@ -134,8 +137,8 @@ jobs:
134137
matrix:
135138
target: [ios, tvos, macos]
136139
flags: [
137-
'--skip-tests --use-static-frameworks',
138-
'--skip-tests --use-libraries'
140+
'--use-static-frameworks --skip-tests ',
141+
'--use-libraries --skip-tests '
139142
]
140143
needs: pod-lib-lint
141144
steps:
@@ -145,4 +148,22 @@ jobs:
145148
- name: PodLibLint Storage Cron
146149
run: |
147150
scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseStorage.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}
148-
scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseStorage.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}
151+
152+
storageswift-cron-only:
153+
# Don't run on private repo.
154+
if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
155+
runs-on: macos-latest
156+
strategy:
157+
matrix:
158+
target: [ios, tvos, macos]
159+
flags: [
160+
'--use-static-frameworks --skip-tests', # Swift pods do not support --use-libraries
161+
]
162+
needs: pod-lib-lint
163+
steps:
164+
- uses: actions/checkout@v2
165+
- name: Setup Bundler
166+
run: scripts/setup_bundler.sh
167+
- name: PodLibLint Storage Cron
168+
run: |
169+
scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseStorageSwift.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}

scripts/build.sh

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -496,14 +496,6 @@ case "$product-$platform-$method" in
496496

497497
Storage-*-xcodebuild)
498498
pod_gen FirebaseStorage.podspec --platforms=ios
499-
RunXcodebuild \
500-
-workspace 'gen/FirebaseStorage/FirebaseStorage.xcworkspace' \
501-
-scheme "FirebaseStorage-Unit-unit" \
502-
"${ios_flags[@]}" \
503-
"${xcb_flags[@]}" \
504-
build \
505-
test
506-
507499
if check_secrets; then
508500
# Integration tests are only run on iOS to minimize flake failures.
509501
RunXcodebuild \
@@ -522,24 +514,6 @@ case "$product-$platform-$method" in
522514
build \
523515
test
524516
fi
525-
526-
pod_gen FirebaseStorage.podspec --platforms=macos --clean
527-
RunXcodebuild \
528-
-workspace 'gen/FirebaseStorage/FirebaseStorage.xcworkspace' \
529-
-scheme "FirebaseStorage-Unit-unit" \
530-
"${macos_flags[@]}" \
531-
"${xcb_flags[@]}" \
532-
build \
533-
test
534-
535-
pod_gen FirebaseStorage.podspec --platforms=tvos --clean
536-
RunXcodebuild \
537-
-workspace 'gen/FirebaseStorage/FirebaseStorage.xcworkspace' \
538-
-scheme "FirebaseStorage-Unit-unit" \
539-
"${tvos_flags[@]}" \
540-
"${xcb_flags[@]}" \
541-
build \
542-
test
543517
;;
544518

545519
StorageSwift-*-xcodebuild)

0 commit comments

Comments
 (0)