Skip to content

Merge pull request #2 from luislard/composer_plugin_api_v2_compat #1

Merge pull request #2 from luislard/composer_plugin_api_v2_compat

Merge pull request #2 from luislard/composer_plugin_api_v2_compat #1

name: PHP Unit Tests
on:
push:
paths:
- '**workflows/php-unit-tests.yml'
- '**.php'
- '**phpunit.xml.dist'
- '**composer.json'
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
unit-tests:
runs-on: ubuntu-latest
if: ${{ !contains(github.event.head_commit.message, 'skip unit') }}
env:
USE_COVERAGE: 'no'
strategy:
fail-fast: false
matrix:
php-versions: [ '8.0', '8.1', '8.2' ]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
ini-values: zend.assertions=1, error_reporting=E_ALL, display_errors=On
coverage: ${{ env.USE_COVERAGE == 'yes' && 'xdebug' || 'none' }}
- name: Install Composer dependencies
uses: ramsey/composer-install@v2
- name: Run unit tests
run: composer tests