Files

51 lines
1.2 KiB
YAML

name: Tests
on:
pull_request:
push:
branches:
- '4.x'
jobs:
tests:
name: PHP ${{ matrix.php }}
runs-on: ubuntu-latest
strategy:
matrix:
php:
- "8.3"
- "8.4"
- "8.5"
include:
- php: "8.6"
composer-options: "--ignore-platform-req=php+"
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: composer:v2
coverage: xdebug
env:
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: "ramsey/composer-install@v4"
with:
composer-options: "${{ matrix.composer-options }}"
- name: Setup problem matchers for PHP
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"
- name: Run PHPStan
run: vendor/bin/phpstan analyse --error-format=github
- name: Setup Problem Matchers for PHPUnit
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- name: Run PHPUnit
run: vendor/bin/phpunit --testdox --coverage-text