Skip to content

Sample option

Sample option #3

Workflow file for this run

name: Run tests
on:
pull_request:
paths:
- "**.php"
- "composer.json"
- ".github/workflows/run-tests.yaml"
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [windows-latest, macOS-latest]
php: ['8.3', '8.2', '8.1', '8.0', '7.4']
name: PHP ${{ matrix.php }} - ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: zip, curl, xdebug
coverage: xdebug
- name: Update composer
run: composer selfupdate
- name: Install dependencies
run: composer update --prefer-dist --no-interaction
- name: Execute tests
run: composer test
env:
XDEBUG_MODE: coverage