Skip to content

Support for PHPStan 2.0 #44

Support for PHPStan 2.0

Support for PHPStan 2.0 #44

Workflow file for this run

# yaml-language-server: $schema=https://json.schemastore.org/github-workflow
name: Tests
on:
pull_request:
push:
branches:
- trunk
jobs:
test:
name: Test / PHP ${{ matrix.php }}
runs-on: ubuntu-latest
permissions:
contents: read
timeout-minutes: 10
strategy:
matrix:
php:
- "8.4"
- "8.3"
- "7.4"
fail-fast: false
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: composer:v2
coverage: none
ini-file: development
env:
fail-fast: true
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Debugging
run: | #shell
php --version
composer --version
- name: Get Composer cache directory
id: composer-cache
run: | #shell
echo dir="$(composer config cache-files-dir)" >> "$GITHUB_OUTPUT"
- name: Composer cache
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
- name: Composer validate
run: composer validate --strict --no-check-lock
- name: Install dependencies
run: composer install --prefer-dist
- name: Run tests
run: composer test:phpunit