## CI - Player And Plugin Tests
name: Player And Plugin Tests
run-name: Player And Plugin Tests

on:
  pull_request:
    branches:
      - '*'

jobs:
  tests:
    uses: kaltura/playkit-js-common/.github/workflows/cypress.yml@master
    secrets: inherit
  running-tests:
    uses: kaltura/ovp-pipelines-pub/.github/workflows/player_tests.yaml@master
    with:
      yarn-run-to-execute: 'eslint'
      node-version: '18.x'

  notification:
    if: always()
    uses: kaltura/ovp-pipelines-pub/.github/workflows/notification.yaml@master
    needs: running-tests
    secrets:
      PLAYER_MSTEAMS_WEBHOOK: ${{ secrets.PLAYER_MSTEAMS_WEBHOOK }}
    with:
      failure-status: ${{ contains(needs.*.result, 'failure') }}
      cancelled-status: ${{ contains(needs.*.result, 'cancelled') }}
      is-test: 'true'
