Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastiaanluca committed Feb 25, 2024
1 parent 6b5c874 commit 04164af
Showing 1 changed file with 12 additions and 24 deletions.
36 changes: 12 additions & 24 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand Down

0 comments on commit 04164af

Please sign in to comment.