diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 43b0b80..38e279e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,38 +1,24 @@ -name: Check code +name: Run tests on: push: pull_request: jobs: - - check: - name: Run checks - PHP ${{ matrix.php }} - ${{ matrix.dependency-version }} + test: + name: Run tests - PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }} runs-on: ${{ matrix.os }} strategy: - fail-fast: false + fail-fast: true matrix: - php: [ 8.2, 8.3 ] - dependency-version: [ prefer-lowest, prefer-stable ] os: [ ubuntu-latest ] + php: [ 8.2, 8.3 ] + laravel: [ 10.*, 11.* ] + stability: [ prefer-lowest, prefer-stable ] steps: - - name: Check out code - uses: actions/checkout@v3 - - - name: Cache PHP dependencies - uses: actions/cache@v3 - with: - path: '**/vendor' - key: ${{ runner.os }}-vendor-cache-${{ hashFiles('**/composer.lock') }} - restore-keys: | - ${{ runner.os }}-vendor-cache- - - - name: Cache Composer dependencies - uses: actions/cache@v3 - with: - path: ~/.composer/cache/files - key: composer-${{ runner.os }}-php-${{ matrix.php }}-${{ hashFiles('composer.json') }} + - name: Checkout code + uses: actions/checkout@v4 - name: Validate Composer configuration file run: composer validate --strict @@ -45,7 +31,9 @@ jobs: coverage: none - name: Install dependencies - run: composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-progress --optimize-autoloader + run: | + composer require "illuminate/database:${{ matrix.laravel }}" "illuminate/support:${{ matrix.laravel }}" --no-interaction --no-update + composer update --${{ matrix.stability }} --prefer-dist --no-interaction - name: Lint code run: vendor/bin/pint --test