prerelease.yml 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. name: prerelease
  2. permissions:
  3. contents: read
  4. on:
  5. pull_request:
  6. # closed will be triggered when a pull request is merged. This is to keep https://github.com/firebase/SpecsTesting up to date.
  7. # types: [closed] # TODO(ncooke3): Uncomment.
  8. paths:
  9. - '.github/workflows/prerelease.yml'
  10. workflow_dispatch:
  11. schedule:
  12. # Run every day at 10pm (PDT) / 1am (EDT) - cron uses UTC times
  13. - cron: '0 5 * * *'
  14. env:
  15. FIREBASE_CI: true
  16. concurrency:
  17. group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
  18. cancel-in-progress: true
  19. jobs:
  20. # TODO: The functions quickstart uses Material which isn't supported by Xcode 15
  21. #functions_quickstart:
  22. # Don't run on private repo unless it is a PR.
  23. # if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'workflow_dispatch'
  24. # needs: buildup_SpecsTesting_repo
  25. # env:
  26. # plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  27. # botaccess: ${{ secrets.PRERELEASE_TESTING_PAT }}
  28. # # TODO: The functions quickstart uses Material which isn't supported by Xcode 15
  29. # runs-on: macos-12
  30. # steps:
  31. # - uses: actions/checkout@v4
  32. # - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
  33. # - name: Xcode
  34. # run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer
  35. # - name: Setup testing repo and quickstart
  36. # run: BOT_TOKEN="${botaccess}" scripts/setup_quickstart.sh functions prerelease_testing
  37. # - name: install secret googleservice-info.plist
  38. # run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-functions.plist.gpg \
  39. # quickstart-ios/functions/GoogleService-Info.plist "$plist_secret"
  40. # - name: Setup custom URL scheme
  41. # run: sed -i '' 's/REVERSED_CLIENT_ID/com.googleusercontent.apps.1025801074639-6p6ebi8amuklcjrto20gvpe295smm8u6/' quickstart-ios/functions/LegacyFunctionsQuickstart/FunctionsExample/Info.plist
  42. # - name: Test objc quickstart
  43. # run: ([ -z $plist_secret ] ||
  44. # scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Functions true)
  45. # - name: Test swift quickstart
  46. # run: ([ -z $plist_secret ] ||
  47. # scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Functions true swift)
  48. # - name: Remove data before upload
  49. # if: ${{ failure() }}
  50. # run: scripts/remove_data.sh functions
  51. # - uses: actions/upload-artifact@v4
  52. # if: ${{ failure() }}
  53. # with:
  54. # name: quickstart_artifacts_functions
  55. # path: quickstart-ios/
  56. quickstart:
  57. # Don't run on private repo unless it is a PR.
  58. if: |
  59. github.repository == 'firebase/firebase-ios-sdk' &&
  60. contains(fromJSON('["schedule", "pull_request", "workflow_dispatch"]'), github.event_name)
  61. strategy:
  62. fail-fast: false
  63. matrix:
  64. include:
  65. - product: Performance
  66. run_tests: true
  67. - product: Storage
  68. run_tests: false
  69. - product: Config
  70. run_tests: true
  71. - product: Messaging
  72. run_tests: false
  73. - product: InAppMessaging
  74. run_tests: true
  75. - product: Firestore
  76. run_tests: false
  77. - product: Database
  78. run_tests: false
  79. - product: Authentication
  80. run_tests: false
  81. - product: Crashlytics
  82. run_tests: true
  83. - product: ABTesting
  84. run_tests: true
  85. name: 'quickstart (prerelease, ${{ matrix.product }}, run_tests: ${{ matrix.run_tests }})'
  86. env:
  87. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  88. botaccess: ${{ secrets.PRERELEASE_TESTING_PAT }}
  89. runs-on: macos-15
  90. steps:
  91. - uses: actions/checkout@v4
  92. - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
  93. - name: Prereqs
  94. run: gem install xcpretty
  95. - name: Xcode
  96. run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer
  97. - name: Setup testing repo and quickstart
  98. run: QUICKSTART_BRANCH=nc/quickstarts scripts/setup_quickstart_spm.sh ${{ matrix.product }} prerelease_testing
  99. - name: Install Secret GoogleService-Info.plist
  100. run: |
  101. scripts/decrypt_gha_secret.sh \
  102. scripts/gha-encrypted/qs-${{ matrix.product }}.plist.gpg \
  103. quickstart-ios/${{ matrix.product }}/GoogleService-Info.plist \
  104. "$plist_secret"
  105. - name: Build Quickstart
  106. uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3
  107. with:
  108. timeout_minutes: 15
  109. max_attempts: 3
  110. retry_wait_seconds: 120
  111. command: DIR=${{ matrix.product }} scripts/test_quickstart.sh ${{ matrix.product }} ${{ matrix.run_tests }}
  112. # Failure sequence to upload artifact.
  113. - name: Remove data before upload.
  114. # if: ${{ failure() }}
  115. run: scripts/remove_data.sh ${{ matrix.product }}
  116. # - uses: actions/upload-artifact@v4
  117. # if: ${{ failure() }}
  118. # with:
  119. # name: quickstart_artifacts_${{ matrix.product }}
  120. # path: quickstart-ios/