Skip to content

Commit 67948da

Browse files
authored
Speedup SPM presubmit (#6184)
1 parent e69c701 commit 67948da

File tree

1 file changed

+24
-2
lines changed

1 file changed

+24
-2
lines changed

.github/workflows/spm.yml

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,18 @@ on:
66
- '.github/workflows/spm.yml'
77
- 'Package.swift'
88
- 'Firebase**'
9+
- 'Google*'
910
schedule:
1011
# Run every day at 11pm (PST) - cron uses UTC times
1112
- cron: '0 7 * * *'
1213

14+
# This workflow builds and tests the Swift Package Manager. Only iOS runs on PRs
15+
# because each platform takes 15-20 minutes after adding Firestore.
16+
17+
# TODO: Write a script to filter the Package.swift for each individual product
18+
# and run just those tests in the product specific workflows. Then this workflow
19+
# should be the full SPM tests for all platforms only on cron.
20+
1321
jobs:
1422
swift-build-run:
1523
# Don't run on private repo unless it is a PR.
@@ -23,11 +31,25 @@ jobs:
2331
run: swift build
2432
- name: Initialize xcodebuild
2533
run: xcodebuild -list
26-
- name: Core ObjC Unit Tests macOS
27-
run: scripts/third_party/travis/retry.sh xcodebuild -scheme Firebase-Package test | xcpretty
2834
- name: Core ObjC Unit Tests iOS
2935
run: scripts/third_party/travis/retry.sh xcodebuild -scheme Firebase-Package test -sdk
3036
iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 11' | xcpretty
37+
38+
cron-only:
39+
# Don't run on private repo.
40+
if: github.event_name == 'schedule' && github.repository != 'FirebasePrivate/firebase-ios-sdk'
41+
42+
runs-on: macOS-latest
43+
steps:
44+
- uses: actions/checkout@v2
45+
- name: Xcode 12
46+
run: sudo xcode-select -s /Applications/Xcode_12_beta.app/Contents/Developer
47+
- name: Build
48+
run: swift build
49+
- name: Initialize xcodebuild
50+
run: xcodebuild -list
51+
- name: Core ObjC Unit Tests macOS
52+
run: scripts/third_party/travis/retry.sh xcodebuild -scheme Firebase-Package test | xcpretty
3153
- name: Core ObjC Unit Tests tvOS
3254
run: scripts/third_party/travis/retry.sh xcodebuild -scheme Firebase-Package test -sdk
3355
appletvsimulator -destination 'platform=tvOS Simulator,name=Apple TV' | xcpretty

0 commit comments

Comments
 (0)