name: Tests on: [push, pull_request] jobs: tests: runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: laravel: [8.*, 7.*, 6.*] php: [7.4, 7.3] os: [ubuntu-latest] name: Laravel ${{ matrix.laravel }} PHP${{ matrix.php }} on ${{ matrix.os }} container: image: lorisleiva/laravel-docker:${{ matrix.php }} steps: - name: Checkout code uses: actions/checkout@v2 - name: Validate composer files run: composer validate - 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: Install dependencies run: | composer require --prefer-dist --no-progress --no-suggest --no-interaction "illuminate/support:${{ matrix.laravel }}" composer install --prefer-dist --no-progress --no-suggest --no-interaction - name: Run tests run: phpunit