Skip to content

database

database #2

name: common_quickstart

Check failure on line 1 in .github/workflows/common_quickstart.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/common_quickstart.yml

Invalid workflow file

(Line: 97, Col: 13): Unexpected symbol: '"Legacy"'. Located at position 21 within expression: inputs.is_legacy && "Legacy" || "Non-Legacy"
permissions:
contents: read
on:
workflow_call:
# Re-usable workflows do not automatically inherit the caller's secrets.
#
# If the calling workflow uses a secret in the `setup_command` input, then
# it also must pass the secret to the re-usable workflow.
#
# Example:
#
# pod_lib_lint:
# uses: ./.github/workflows/common_cocoapods.yml
# with:
# product: FirebaseFoo
# setup_command: |
# scripts/decrypt_gha_secret.sh \
# /path/to/GoogleService-Info.plist.gpg \
# /path/to/dest/GoogleService-Info.plist "$plist_secret"
# secrets:
# plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
#
secrets:
plist_secret:
required: true
inputs:
# The product to test be tested (e.g. `FirebaseABTesting`).
product:
type: string
required: true
# TODO: What does this mean?
is_legacy:
type: boolean
required: true
plist_src_path:
type: string
required: true
plist_dst_path:
type: string
required: true
# swift or objc
quickstart_type:
type: string
required: false
default: objc
run_tests:
type: boolean
required: false
default: true
# A command to execute before testing.
#
# This is useful for additional set up, like starting an emulator or
# downloading test data.
#
# Note, this step has an env var set to decrypt plists. Use
# "$plist_secret" in the given command. See `secrets` documentation
# at top of this file.
#
# Example: `FirebaseFunctions/Backend/start.sh synchronous`
setup_command:
type: string
required: false
default: ""
jobs:
quickstart:
# Run on the main repo's scheduled jobs or pull requests and manual workflow invocations.
if: (github.repository == 'firebase/firebase-ios-sdk' && github.event_name == 'schedule') || contains(fromJSON('["pull_request", "workflow_dispatch"]'), github.event_name)
env:
plist_secret: ${{ secrets.plist_secret }}
runs-on: macos-15
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
- name: Xcode
run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer
- name: Run setup command.
env:
LEGACY: ${{ inputs.is_legacy }}
run: ${{ inputs.setup_command }}
- name: Install Secret GoogleService-Info.plist
run: |
scripts/decrypt_gha_secret.sh \
${{ inputs.plist_src_path }} \
${{ inputs.plist_dst_path }} \
"$plist_secret"
- name: Build ${{ inputs.product }} Quickstart (${{ inputs.quickstart_type }} / ${{ inputs.is_legacy && "Legacy" || "Non-Legacy" }})
uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3
env:
LEGACY: ${{ inputs.is_legacy }}
with:
timeout_minutes: 15
max_attempts: 3
retry_wait_seconds: 120
command: |
scripts/test_quickstart.sh \
${{ inputs.product }} \
${{ inputs.run_tests }} \
${{ inputs.quickstart_type }}
# TODO: Add upload on fialure.
# - name: Upload raw logs if failed.
# if: ${{ failure() }}
# uses: actions/upload-artifact@v4
# with:
# name:
# path: