name: tests

on: [push, pull_request]

jobs:
  tests:
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        php: [7.4, 7.3, 7.2, 8.0]
        stability: [prefer-lowest, prefer-stable]

    name: PHP ${{ matrix.php }} - ${{ matrix.stability }}

    steps:
      - name: Checkout code
        uses: actions/checkout@v2

      - name: Cache dependencies
        uses: actions/cache@v1
        with:
          path: ~/.composer/cache/files
          key: dependencies-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}

      - name: Setup PHP
        uses: shivammathur/setup-php@v2
        with:
          php-version: ${{ matrix.php }}
          extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, gd
          coverage: none

      - name: Install dependencies
        run: composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-progress

      - name: Execute tests
        run: vendor/bin/phpunit --verbose

name: tests

on: [push, pull_request]

jobs:
  tests:
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        php: [8.0]
        stability: [prefer-lowest, prefer-stable]

    name: PHP ${{ matrix.php }} - ${{ matrix.stability }}

    steps:
      - name: Checkout code
        uses: actions/checkout@v2

      - name: Cache dependencies
        uses: actions/cache@v1
        with:
          path: ~/.composer/cache/files
          key: dependencies-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}

      - name: Setup PHP
        uses: shivammathur/setup-php@v2
        with:
          php-version: ${{ matrix.php }}
          extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, gd
          coverage: none

      - name: Install dependencies
        run: composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-progress

      - name: Execute tests
        run: vendor/bin/phpunit --verbose

Update GitHub Actions for Laravel 9
Update GitHub Actions for Laravel 9
