Skip to content

build: improved PHP CI workflow #11

build: improved PHP CI workflow

build: improved PHP CI workflow #11

Workflow file for this run

name: Run PHP CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
permissions:
contents: read
jobs:
build:
strategy:
matrix:
php-version: [8.1, 8.2, 8.3, 8.4]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Validate composer.json and composer.lock
run: composer validate --strict
- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v4
with:
path: |
vendor
key: ${{ runner.os }}-php-${{ matrix.php-version }}-${{ hashFiles('composer.json') }}
restore-keys: |
${{ runner.os }}-php-${{ matrix.php-version }}-
${{ runner.os }}-php-
- name: Install dependencies
#language=bash
run: composer install --no-interaction --no-progress --prefer-dist --optimize-autoloader
- name: Run Pest
#language=bash
run: ./vendor/bin/pest --ci