name: Validate

on:
  workflow_call:
    secrets:
      FIREBASE_OPTIONS:
        required: true

jobs:
  analyze:
    name: Analyze
    runs-on: ubuntu-latest
    steps:
      - name: Setup Environment
        uses: JagandeepBrar/LunaSea/.github/actions/prepare_for_build@master
        with:
          firebase-options: ${{ secrets.FIREBASE_OPTIONS }}
          platform: test

      - name: Analyze Release
        uses: invertase/github-action-dart-analyzer@v1
        with:
          fatal-infos: false
          fatal-warnings: true

      - name: Test Release
        run: flutter test
