name: Library Checks (E2E)
permissions:
  contents: read
on:
  pull_request:
  push:
    branches:
      - main
    paths-ignore:
      - 'website/**'
  merge_group:

jobs:
  workqueue:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6
      - uses: ahmadnassri/action-workflow-queue@v1
        if: ${{ github.event_name != 'pull_request' }}
        with:
          timeout: 6000000
  rest-e2e-test:
    needs: workqueue
    name: Rest
    uses: ./.github/workflows/e2e-test.yml
    secrets: inherit
    with:
      package: rest
      event_name: ${{ github.event_name }}
  bot-e2e-test:
    name: Bot
    needs: rest-e2e-test
    uses: ./.github/workflows/e2e-test.yml
    secrets: inherit
    with:
      package: bot
      event_name: ${{ github.event_name }}
