Skip to content

Commit

Permalink
Distinguish unit and integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
paulb777 committed Oct 31, 2023
1 parent 8063410 commit 6165a13
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 30 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/messaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ concurrency:

jobs:

messaging:
messaging-integration-tests:
# Don't run on private repo unless it is a PR.
if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
env:
Expand All @@ -48,7 +48,7 @@ jobs:
FirebaseMessaging/Tests/IntegrationTests/Resources/GoogleService-Info.plist "$plist_secret"
- name: Xcode
run: sudo xcode-select -s /Applications/xcode_15.0.1.app/Contents/Developer
- name: BuildAndTest # can be replaced with pod lib lint with CocoaPods 1.10
- name: BuildAndTest
run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/build.sh Messaging all)


Expand All @@ -74,7 +74,7 @@ jobs:
- name: Xcode
run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
- name: Build and test
run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb ${{ matrix.podspec }} --platforms=${{ matrix.target }}
run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb ${{ matrix.podspec }} --test-specs=unit --platforms=${{ matrix.target }}

spm:
# Don't run on private repo unless it is a PR.
Expand Down Expand Up @@ -196,7 +196,7 @@ jobs:
- name: Xcode
run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
- name: PodLibLint Messaging Cron
run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseMessaging.podspec --platforms=${{ matrix.target }} --use-static-frameworks
run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseMessaging.podspec --test-specs=unit --platforms=${{ matrix.target }} --use-static-frameworks

messaging-sample-build-test:
# Don't run on private repo unless it is a PR.
Expand Down
26 changes: 0 additions & 26 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -369,14 +369,6 @@ case "$product-$platform-$method" in
AppHost-FirebaseMessaging-Unit-Tests \
../../../FirebaseMessaging/Tests/IntegrationTests/Resources/GoogleService-Info.plist

RunXcodebuild \
-workspace 'gen/FirebaseMessaging/FirebaseMessaging.xcworkspace' \
-scheme "FirebaseMessaging-Unit-unit" \
"${ios_flags[@]}" \
"${xcb_flags[@]}" \
build \
test

if check_secrets; then
# Integration tests are only run on iOS to minimize flake failures.
RunXcodebuild \
Expand All @@ -386,24 +378,6 @@ case "$product-$platform-$method" in
"${xcb_flags[@]}" \
test
fi

pod_gen FirebaseMessaging.podspec --platforms=macos --clean
RunXcodebuild \
-workspace 'gen/FirebaseMessaging/FirebaseMessaging.xcworkspace' \
-scheme "FirebaseMessaging-Unit-unit" \
"${macos_flags[@]}" \
"${xcb_flags[@]}" \
build \
test

pod_gen FirebaseMessaging.podspec --platforms=tvos --clean
RunXcodebuild \
-workspace 'gen/FirebaseMessaging/FirebaseMessaging.xcworkspace' \
-scheme "FirebaseMessaging-Unit-unit" \
"${tvos_flags[@]}" \
"${xcb_flags[@]}" \
build \
test
;;

MessagingSample-*-*)
Expand Down

0 comments on commit 6165a13

Please sign in to comment.