name: 2.8.x on PHP 5.6

# Run this workflow every time a new commit pushed to your repository
on:
  # Allows you to run this workflow manually from the Actions tab
  workflow_dispatch:
  push:
    branches: ['2.8.x']
  pull_request:
    branches: ['2.8.x']

jobs:
  run:
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: ['ubuntu-latest']
        php-version: ['5.6']
        phpunit-version: ['4.8.36']
        composer-version: ['v1']
    steps:
      - name: Checkout
        uses: actions/checkout@v4

      - name: Setup PHP ${{ matrix.php-version }} on ${{ matrix.os }}
        uses: shivammathur/setup-php@v2
        with:
          php-version: ${{ matrix.php-version }}
          extensions: mbstring, intl
          ini-values: post_max_size=256M, max_execution_time=180
          coverage: xdebug
          tools: phpunit:${{ matrix.phpunit-version }}, composer:${{ matrix.composer-version }}

      - name: Run tests
        run: phpunit -v -c tests/phpunit.xml --coverage-text --strict-coverage --stop-on-risky
        shell: bash
