# tests_entry.yml
# Entry point to the test suites
#
# - If neither ci:run, ci:run_full or ci:ready_to_merge labels are on PR, fail and exit.
# - If the PR comment body doesn't contain 'BUG=' fail and exit.
# - If ci:run or ci:run_full label is on PR, remove label and run the test scripts.
# - If ci:ready_to_merge is on the PR and the pull_request_target type is synchronize not triggered
#   by the mergify[bot] user, remove label and fail job.
# - If ci:ready_to_merge label is on PR and pull_request_target type is labeled, run the test scripts.
#
# The end result is labeling ci:run or ci:ready_to_merge will run the test scripts,
# If Mergify merges to the PR, the test scripts will run. If anyone else tries to add
# a commit to the PR or merge , the script will fail and ci:ready_to_merge will be
# removed.
#
# This script runs the test scripts directly. Scheduled or manual runs use
# run_<scriptname>.yml as the entry point.

name: Tests Entry Point
on:
  pull_request_target:
    types:
      - synchronize
      - labeled

jobs:
  no-labels:
    runs-on: ubuntu-latest
    steps:
      - name: fail-without-labels
        if: github.event.action == 'labeled' &&
          !(github.event.label.name == 'ci:run' ||
            github.event.label.name == 'ci:ready_to_merge' ||
            github.event.label.name == 'ci:run_full')
        run: exit 1

  ci-ready-to-merge:
    runs-on: ubuntu-latest
    needs: no-labels
    steps:
      - name: remove-ready-to-merge
        if: ${{ (contains(github.event.pull_request.labels.*.name, 'ci:ready_to_merge') &&
            (github.event.action == 'synchronize') &&
            !(github.event.sender.login == 'mergify[bot]')) }}
        uses: actions/github-script@v5
        with:
          github-token: ${{ secrets.TFLM_BOT_REPO_TOKEN }}
          script: |
            github.rest.issues.removeLabel({
              issue_number: context.issue.number,
              owner: context.repo.owner,
              repo: context.repo.repo,
              name: 'ci:ready_to_merge'
            })
      - name: fail-on-bad-synch
        if: ${{ (github.event.action == 'synchronize') && !(github.event.sender.login == 'mergify[bot]') }}
        run: exit 1

  ci-run:
    runs-on: ubuntu-latest
    needs: ci-ready-to-merge
    steps:
      - name: remove-cirun
        if: github.event.action == 'labeled' &&
            github.event.label.name == 'ci:run'
        uses: actions/github-script@v5
        with:
          github-token: ${{ secrets.TFLM_BOT_REPO_TOKEN }}
          script: |
            github.rest.issues.removeLabel({
              issue_number: context.issue.number,
              owner: context.repo.owner,
              repo: context.repo.repo,
              name: 'ci:run'
            })
        continue-on-error: true

  ci-run-full:
    runs-on: ubuntu-latest
    needs: ci-run
    steps:
      - name: remove-cirun-full
        if: github.event.action == 'labeled' &&
            github.event.label.name == 'ci:run_full'
        uses: actions/github-script@v5
        with:
          github-token: ${{ secrets.TFLM_BOT_REPO_TOKEN }}
          script: |
            github.rest.issues.removeLabel({
              issue_number: context.issue.number,
              owner: context.repo.owner,
              repo: context.repo.repo,
              name: 'ci:run_full'
            })
        continue-on-error: true

  pr-has-bug:
    runs-on: ubuntu-latest
    needs: ci-run-full
    name: PR has Bug
    steps:
      - name: Check for BUG=
        if: ${{ !contains(github.event.pull_request.body, 'BUG=') }}
        run: |
          echo "PR description requires a BUG= line with issue number."
          echo "See https://testing.googleblog.com/2017/09/code-health-providing-context-with.html for additional context"
          exit 1

  call-ci:
    needs: ci-run
    uses: ./.github/workflows/ci.yml
    with:
      trigger-sha: ${{ github.event.pull_request.head.sha }}

  call-hexagon:
    needs: ci-run
    uses: ./.github/workflows/hexagon.yml
    with:
      trigger-sha: ${{ github.event.pull_request.head.sha }}
    secrets:
      tflm-bot-token: ${{ secrets.TFLM_BOT_PACKAGE_READ_TOKEN }}

  call-xtensa-presubmit:
    needs: ci-run
    uses: ./.github/workflows/xtensa_presubmit.yml
    with:
      trigger-sha: ${{ github.event.pull_request.head.sha }}
    secrets:
      tflm-bot-token: ${{ secrets.TFLM_BOT_PACKAGE_READ_TOKEN }}

  call-check-tflite-files:
    needs: ci-run
    uses: ./.github/workflows/check_tflite_files.yml
    with:
      trigger-sha: ${{ github.event.pull_request.head.sha }}
      pr-number: ${{ github.event.pull_request.number }}
      pr-body: ${{ github.event.pull_request.body }}
    secrets:
      tflm-bot-token: ${{ secrets.TFLM_BOT_PACKAGE_READ_TOKEN }}
