Skip to content

chore: add testing against modern PHP versions #51

chore: add testing against modern PHP versions

chore: add testing against modern PHP versions #51

Workflow file for this run

name: PHP Tests
on: [push, pull_request]
jobs:
phpunit:
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.experimental }}
name: "PHP-${{ matrix.php-versions }}: PHPUnit"
strategy:
matrix:
php-versions: ['7.3', '7.4']
experimental: [false]
include:
- php-versions: '8.0'
experimental: true
- php-versions: '8.1'
experimental: true
- php-versions: '8.2'
experimental: true
- php-versions: '8.3'
experimental: true
- php-versions: '8.4'
experimental: true
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
tools: phpunit:5
extensions: redis
- name: Setup problem matchers for PHP
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"
- name: Install dependencies
run: composer install
- name: Install redis
run: sudo apt-get install -y redis-server
- name: Setup problem matchers for PHPUnit
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- name: Run PHPunit
run: phpunit --configuration phpunit.xml.dist
phpcs:
runs-on: ubuntu-latest
continue-on-error: true
name: "PHPCS"
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup PHPCS
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
tools: cs2pr, phpcs
- name: Setup problem matchers for PHP
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"
- name: Run PHPCS
run: phpcs -q --report=checkstyle lib | cs2pr
phpstan:
runs-on: ubuntu-latest
continue-on-error: false
name: "PHPStan"
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup PHPStan
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
tools: phpstan
- name: Setup problem matchers for PHP
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"
- name: Install dependencies
run: composer install
- name: Run PHPStan
run: phpstan analyse lib -l1