functions.yml 3.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. name: functions
  2. on:
  3. pull_request:
  4. paths:
  5. - 'Functions**'
  6. - '.github/workflows/functions.yml'
  7. - 'Interop/Auth/Public/*.h'
  8. - 'FirebaseMessaging/Sources/Interop/*.h'
  9. - 'Gemfile'
  10. schedule:
  11. # Run every day at 11pm (PST) - cron uses UTC times
  12. - cron: '0 7 * * *'
  13. jobs:
  14. spm:
  15. # Don't run on private repo unless it is a PR.
  16. if: github.repository != 'FirebasePrivate/firebase-ios-sdk' || github.event_name == 'pull_request'
  17. runs-on: macOS-latest
  18. steps:
  19. - uses: actions/checkout@v2
  20. - name: Xcode 12
  21. run: sudo xcode-select -s /Applications/Xcode_12_beta.app/Contents/Developer
  22. - name: Initialize xcodebuild
  23. run: xcodebuild -list
  24. - name: iOS Unit Tests
  25. run: scripts/third_party/travis/retry.sh xcodebuild -scheme FirebaseFunctions build -sdk
  26. iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 11' | xcpretty
  27. spm-cron:
  28. # Don't run on private repo.
  29. if: github.event_name == 'schedule' && github.repository != 'FirebasePrivate/firebase-ios-sdk'
  30. runs-on: macOS-latest
  31. steps:
  32. - uses: actions/checkout@v2
  33. - name: Xcode 12
  34. run: sudo xcode-select -s /Applications/Xcode_12_beta.app/Contents/Developer
  35. - name: Initialize xcodebuild
  36. run: xcodebuild -list
  37. - name: macOS Unit Tests
  38. run: scripts/third_party/travis/retry.sh xcodebuild -scheme FirebaseFunctions build | xcpretty
  39. - name: tvOS Unit Tests
  40. run: scripts/third_party/travis/retry.sh xcodebuild -scheme FirebaseFunctions build -sdk
  41. appletvsimulator -destination 'platform=tvOS Simulator,name=Apple TV' | xcpretty
  42. quickstart:
  43. # Don't run on private repo unless it is a PR.
  44. if: github.repository != 'FirebasePrivate/firebase-ios-sdk' || github.event_name == 'pull_request'
  45. env:
  46. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  47. signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  48. runs-on: macOS-latest
  49. steps:
  50. - uses: actions/checkout@v2
  51. - name: Setup quickstart
  52. run: scripts/setup_quickstart.sh functions
  53. - name: install secret googleservice-info.plist
  54. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-functions.plist.gpg \
  55. quickstart-ios/functions/GoogleService-Info.plist "$plist_secret"
  56. - name: Install Secret FIREGSignInInfo.h
  57. run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/FIREGSignInInfo.h.gpg \
  58. quickstart-ios/TestUtils/FIREGSignInInfo.h "$signin_secret"
  59. - name: Setup custom URL scheme
  60. run: sed -i '' 's/REVERSED_CLIENT_ID/com.googleusercontent.apps.1025801074639-6p6ebi8amuklcjrto20gvpe295smm8u6/' quickstart-ios/functions/FunctionsExample/Info.plist
  61. - name: Test objc quickstart
  62. run: ([ -z $plist_secret ] ||
  63. scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Functions)
  64. - name: Test swift quickstart
  65. run: ([ -z $plist_secret ] ||
  66. scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Functions swift)
  67. archive-cron:
  68. # Don't run on private repo.
  69. if: github.event_name == 'schedule' && github.repository != 'FirebasePrivate/firebase-ios-sdk'
  70. runs-on: macOS-latest
  71. strategy:
  72. matrix:
  73. target: [ios, tvos, macos]
  74. steps:
  75. - uses: actions/checkout@v2
  76. - name: Setup Bundler
  77. run: scripts/setup_bundler.sh
  78. - name: Setup project and archive
  79. run: scripts/test_archiving.sh FirebaseFunctions ${{ matrix.target }} ArchiveOutputs/${{ matrix.target }}.xcarchive