name: run-tests

on:
  push:

jobs:
  test:
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        php: [7.4]
        laravel: [7.*, 8.*]
        dependency-version: [prefer-lowest, prefer-stable]
        os: [ubuntu-latest]

    name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }} - ${{ matrix.os }}

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

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

      - name: Setup PHP
        uses: shivammathur/setup-php@v1
        with:
          php-version: ${{ matrix.php }}
          extensions: pdo, sqlite, pdo_sqlite
          coverage: none

      - name: Install dependencies
        run: |
          composer require "laravel/framework:${{ matrix.laravel }}" --no-interaction --no-update
          composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest

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

name: run-tests

on:
  push:

jobs:
  test:
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        php: [7.4]
        laravel: [7.*, 8.*]
        dependency-version: [prefer-lowest, prefer-stable]
        os: [ubuntu-latest]

    name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }} - ${{ matrix.os }}

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

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

      - name: Setup PHP
        uses: shivammathur/setup-php@v1
        with:
          php-version: ${{ matrix.php }}
          extensions: pdo, sqlite, pdo_sqlite
          coverage: none

      - name: Install dependencies
        run: |
          composer require "laravel/framework:${{ matrix.laravel }}" --no-interaction --no-update
          composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest

      - name: Execute tests
        run: vendor/bin/pest

Use correct command to run tests in CI
Use correct command to run tests in CI
