Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 19 additions & 5 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,16 @@ concurrency:

jobs:
unit-php:
name: PHP
name: Unit tests on PHP ${{ matrix.php }}
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
fail-fast: true
matrix:
php: [ '7.2', '7.3', '7.4', '8.0', '8.1', '8.2' ]

env:
WP_ENV_PHP_VERSION: ${{ matrix.php }}

steps:
- name: Checkout project
Expand All @@ -31,13 +39,19 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 7.2
php-version: '${{ matrix.php }}'
extensions: mbstring, intl

- name: Install composer dependencies
# Ensure that Composer installs the correct versions of packages.
- name: Override PHP version in composer.json
run: |
composer validate
composer install
composer config platform.php '${{ matrix.php }}.99'
composer require "composer/installers:^2.0" --no-update

- name: Install composer dependencies
uses: ramsey/composer-install@v2
with:
dependency-versions: 'highest'

- name: Npm install and build
run: |
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@
"require-dev": {
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.2",
"humanmade/psalm-plugin-wordpress": "^2.0",
"overtrue/phplint": "^3.2",
"overtrue/phplint": "^3.2 || ^9.0",
"php-parallel-lint/php-parallel-lint": "^1.3",
"phpcompatibility/php-compatibility": "^9.3",
"phpro/grumphp-shim": "^0.22",
"phpro/grumphp-shim": "^0.22 || ^1.10",
"roave/security-advisories": "dev-latest",
"roots/wordpress-no-content": "^6.0",
"squizlabs/php_codesniffer": "^3.7",
Expand Down
Loading