name: shared-swift

permissions:
  contents: read

on:
  workflow_dispatch:
  pull_request:
    paths:
    - 'FirebaseSharedSwift**'
    - '.github/workflows/shared-swift.yml'
    - '.github/workflows/common.yml'
    - '.github/workflows/common_cocoapods.yml'
    - 'Gemfile*'

  schedule:
    # Run every day at 4am (PDT) / 7am (EDT) - cron uses UTC times
    - cron:  '0 11 * * *'

concurrency:
    group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
    cancel-in-progress: true

jobs:
  spm:
    uses: ./.github/workflows/common.yml
    with:
      target: FirebaseSharedSwiftTests

  pod_lib_lint:
    uses: ./.github/workflows/common_cocoapods.yml
    with:
      product: FirebaseSharedSwift
      supports_swift6: true
