installations.yml 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. name: installations
  2. on:
  3. pull_request:
  4. paths:
  5. - 'FirebaseInstallations**'
  6. - '.github/workflows/installations.yml'
  7. - 'Gemfile*'
  8. schedule:
  9. # Run every day at 10pm (PST) - cron uses UTC times
  10. - cron: '0 6 * * *'
  11. concurrency:
  12. group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
  13. cancel-in-progress: true
  14. jobs:
  15. pod-lib-lint:
  16. # Don't run on private repo unless it is a PR.
  17. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  18. runs-on: macos-11
  19. env:
  20. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  21. strategy:
  22. matrix:
  23. target: [ios, tvos, macos]
  24. steps:
  25. - uses: actions/checkout@v2
  26. - name: Setup Bundler
  27. run: scripts/setup_bundler.sh
  28. - name: Configure test keychain
  29. run: scripts/configure_test_keychain.sh
  30. - name: Install GoogleService-Info.plist
  31. run: |
  32. mkdir -p FirebaseInstallations/Source/Tests/Resources
  33. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/Installations/GoogleService-Info.plist.gpg \
  34. FirebaseInstallations/Source/Tests/Resources/GoogleService-Info.plist "$plist_secret"
  35. - name: Get boolean for secrets available
  36. id: secrets
  37. run: echo "::set-output name=val::$([[ -z $plist_secret ]] && echo "0" || echo "1")"
  38. - name: Build and test
  39. run: |
  40. export FIS_INTEGRATION_TESTS_REQUIRED=${{ steps.secrets.outputs.val }}
  41. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseInstallations.podspec \
  42. --platforms=${{ matrix.target }}
  43. spm:
  44. # Don't run on private repo unless it is a PR.
  45. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  46. runs-on: macos-11
  47. strategy:
  48. matrix:
  49. target: [iOS, tvOS, macOS, catalyst, watchOS]
  50. steps:
  51. - uses: actions/checkout@v2
  52. - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
  53. with:
  54. cache_key: ${{ matrix.os }}
  55. - name: Initialize xcodebuild
  56. run: scripts/setup_spm_tests.sh
  57. - name: Unit Tests
  58. run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseInstallations ${{ matrix.target }} spmbuildonly
  59. catalyst:
  60. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  61. runs-on: macos-11
  62. steps:
  63. - uses: actions/checkout@v2
  64. - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
  65. with:
  66. cache_key: ${{ matrix.os }}
  67. - name: Setup Bundler
  68. run: scripts/setup_bundler.sh
  69. - name: Setup project and Build for Catalyst
  70. run: scripts/test_catalyst.sh FirebaseInstallations test FirebaseInstallations-Unit-unit
  71. quickstart:
  72. # Don't run on private repo unless it is a PR.
  73. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
  74. runs-on: macos-11
  75. steps:
  76. - uses: actions/checkout@v2
  77. - name: Setup quickstart
  78. run: scripts/setup_quickstart.sh installations
  79. - name: Copy mock plist
  80. run: cp quickstart-ios/mock-GoogleService-Info.plist quickstart-ios/installations/GoogleService-Info.plist
  81. - name: Test objc quickstart
  82. run: scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Installations true
  83. - name: Test swift quickstart
  84. run: scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Installations true swift
  85. installations-cron-only:
  86. if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
  87. runs-on: macos-11
  88. env:
  89. plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
  90. FIR_IID_INTEGRATION_TESTS_REQUIRED: ${{ secrets.GHASecretsGPGPassphrase1 }}
  91. strategy:
  92. matrix:
  93. target: [ios, tvos, macos]
  94. flags: [
  95. '--use-static-frameworks',
  96. '--use-libraries --skip-tests'
  97. ]
  98. needs: pod-lib-lint
  99. steps:
  100. - uses: actions/checkout@v2
  101. - name: Setup Bundler
  102. run: scripts/setup_bundler.sh
  103. - name: Configure test keychain
  104. run: scripts/configure_test_keychain.sh
  105. - name: Install GoogleService-Info.plist
  106. run: |
  107. mkdir -p FirebaseInstallations/Source/Tests/Resources
  108. scripts/decrypt_gha_secret.sh scripts/gha-encrypted/Installations/GoogleService-Info.plist.gpg \
  109. FirebaseInstallations/Source/Tests/Resources/GoogleService-Info.plist "$plist_secret"
  110. - name: Get boolean for secrets available
  111. id: secrets
  112. run: echo "::set-output name=val::$([[ -z $plist_secret ]] && echo "0" || echo "1")"
  113. - name: PodLibLint Installations Cron
  114. run: |
  115. export FIS_INTEGRATION_TESTS_REQUIRED=${{ steps.secrets.outputs.val }}
  116. scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseInstallations.podspec \
  117. --platforms=${{ matrix.target }} ${{ matrix.flags }} \