Skip to content

Fix tests for 7.4

Fix tests for 7.4 #3

Workflow file for this run

name: Unit Tests
on:
push:
paths:
- '**workflows/unit-tests.yml'
- '**.php'
- '**phpunit.xml.dist'
pull_request:
paths:
- '**workflows/unit-tests.yml'
- '**.php'
- '**phpcs.xml.dist'
workflow_dispatch:
concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true
jobs:
unit-tests-php:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php-ver: [ '7.4', '8.0', '8.1', '8.2', '8.3' ]
wp-ver: [ '5.9', '6.0', '6.1', '6.2', '6.3', '6.4', '6' ]
exclude:
- php-ver: '8.2'
wp-ver: '5.9'
- php-ver: '8.3'
wp-ver: '5.9'
- php-ver: '8.2'
wp-ver: '6.0'
- php-ver: '8.3'
wp-ver: '6.0'
- php-ver: '8.3'
wp-ver: '6.1'
- php-ver: '8.3'
wp-ver: '6.2'
- php-ver: '8.3'
wp-ver: '6.3'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-ver }}
ini-values: zend.assertions=1, error_reporting=-1, display_errors=On
coverage: none
- name: Adjust dependencies in 'composer.json'
run: |
composer remove roots/wordpress-no-content inpsyde/php-coding-standards vimeo/psalm --dev --no-update
composer require "roots/wordpress-no-content:~${{ matrix.wp-ver }}.0" --dev --no-update
- name: Install dependencies
uses: ramsey/composer-install@v3
- name: Run unit tests
run: ./vendor/bin/phpunit --no-coverage