on:
  push:
  merge_group:
  pull_request:
    types:
      - opened
      - synchronize
      - ready_for_review

name: Static analysis on Test files

jobs:
  check-tests:
    runs-on: ubuntu-latest
    name: check tests
    if: github.repository_owner == 'mermaid-js'
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0
      - uses: testomatio/check-tests@stable
        with:
          framework: cypress
          tests: './cypress/e2e/**/**.spec.js'
          token: ${{ secrets.GITHUB_TOKEN }}
          has-tests-label: true
