name: core_extension

permissions:
  contents: read

on:
  workflow_dispatch:
  pull_request:
    paths:
    - 'FirebaseCoreExtension.podspec'
    - 'FirebaseCore/Extension/**'
    - '.github/workflows/core_extension.yml'
    - '.github/workflows/common.yml'
    - '.github/workflows/common_cocoapods.yml'
    - '.github/workflows/common_cocoapods_cron.yml'
    - 'Gemfile*'
  schedule:
    # Run every day at 3am (PDT) / 6am (EDT) - cron uses UTC times
    - cron:  '0 10 * * *'

jobs:
  # Since `FirebaseCoreExtension` only contains headers, linting is sufficient for testing.
  pod_lib_lint:
    uses: ./.github/workflows/common_cocoapods.yml
    with:
      product: FirebaseCoreExtension

  core-extension-cron-only:
    needs: pod_lib_lint
    uses: ./.github/workflows/common_cocoapods_cron.yml
    with:
      product: FirebaseCoreExtension
      platforms: '[ "ios", "tvos", "macos" ]'
      flags: '[ "--use-static-frameworks" ]'
