
name: "Continuous Integration"

on:
  pull_request:
    branches:
      - "*.x"
  push:
    branches:
      - "*.x"

jobs:
  roave_bc_check:
    name: "Roave BC Check"
    runs-on: ubuntu-latest
    steps:
      - uses: "actions/checkout@v4"
        with:
          fetch-depth: 0

      - name: Install PHP with extensions.
        uses: shivammathur/setup-php@v2
        with:
          php-version: "8.4"

      - name: Install roave/backward-compatibility-check.
        run: composer require --dev roave/backward-compatibility-check

      - name: Run roave/backward-compatibility-check.
        run: vendor/bin/roave-backward-compatibility-check

  phpunit:
    name: "PHPUnit"
    uses: "doctrine/.github/.github/workflows/continuous-integration.yml@7.3.0"
    with:
      php-versions: '["7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3", "8.4"]'
    secrets:
      CODECOV_TOKEN: "${{ secrets.CODECOV_TOKEN }}"
