reusable_release_quickstart.yml 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. name: Reusable Release Quickstart Test
  2. on:
  3. workflow_call:
  4. inputs:
  5. product:
  6. description: 'The product name (e.g., abtesting, auth).'
  7. required: true
  8. type: string
  9. runs-on:
  10. description: 'The runner to use (e.g., macos-14).'
  11. required: true
  12. type: string
  13. legacy:
  14. description: 'A boolean to indicate if it is a legacy quickstart.'
  15. required: false
  16. type: boolean
  17. default: false
  18. xcode-version:
  19. description: 'Optional Xcode version.'
  20. required: false
  21. type: string
  22. test-objc:
  23. description: 'A boolean to indicate if obj-c tests should run.'
  24. required: false
  25. type: boolean
  26. default: false
  27. test-swift:
  28. description: 'A boolean to indicate if swift tests should run.'
  29. required: false
  30. type: boolean
  31. default: true
  32. extra-setup:
  33. description: 'A string for any extra setup commands.'
  34. required: false
  35. type: string
  36. secrets:
  37. plist_secret:
  38. required: true
  39. bot_access_token:
  40. required: true
  41. jobs:
  42. quickstart:
  43. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch'
  44. runs-on: ${{ inputs.runs-on }}
  45. env:
  46. plist_secret: ${{ secrets.plist_secret }}
  47. botaccess: ${{ secrets.bot_access_token }}
  48. LEGACY: ${{ inputs.legacy }}
  49. steps:
  50. - uses: actions/checkout@v4
  51. - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
  52. - name: Select Xcode version
  53. if: ${{ inputs.xcode-version != '' }}
  54. run: sudo xcode-select -s /Applications/Xcode_${{ inputs.xcode-version }}.app/Contents/Developer
  55. - name: Setup testing repo and quickstart
  56. run: BOT_TOKEN="${{ secrets.bot_access_token }}" scripts/setup_quickstart.sh ${{ inputs.product }} nightly_release_testing
  57. - name: Install Secret GoogleService-Info.plist
  58. run: |
  59. scripts/decrypt_gha_secret.sh \
  60. scripts/gha-encrypted/qs-${{ inputs.product }}.plist.gpg \
  61. quickstart-ios/${{ inputs.product }}/GoogleService-Info.plist \
  62. "${{ secrets.plist_secret }}"
  63. - name: Extra setup
  64. if: ${{ inputs.extra-setup != '' }}
  65. run: ${{ inputs.extra-setup }}
  66. - name: Test objc quickstart
  67. if: ${{ inputs.test-objc }}
  68. run: |
  69. ([ -z "${{ secrets.plist_secret }}" ] || \
  70. scripts/third_party/travis/retry.sh scripts/test_quickstart.sh \
  71. ${{ inputs.product }} ${{ inputs.legacy }})
  72. - name: Test swift quickstart
  73. if: ${{ inputs.test-swift }}
  74. run: |
  75. ([ -z "${{ secrets.plist_secret }}" ] || \
  76. scripts/third_party/travis/retry.sh scripts/test_quickstart.sh \
  77. ${{ inputs.product }} ${{ inputs.legacy }} swift)
  78. - name: Remove data before upload
  79. if: ${{ failure() }}
  80. run: scripts/remove_data.sh ${{ inputs.product }}
  81. - uses: actions/upload-artifact@v4
  82. if: ${{ failure() }}
  83. with:
  84. name: quickstart_artifacts_${{ inputs.product }}
  85. path: quickstart-ios/