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
23 changes: 18 additions & 5 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,36 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Get composer cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Cache Composer dependencies
uses: actions/cache@v4
with:
path: /tmp/composer-cache
key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }}

- name: Setup PHP
uses: php-actions/composer@v6
- name: Setup PHP with tools
uses: shivammathur/setup-php@v2
with:
php_version: ${{ matrix.php-versions }}
command: update
php-version: '8.3'
tools: composer:v2

- name: Validate Composer
run: composer validate --strict

- name: Install dependencies
run: composer install --prefer-dist

- name: PHP Lint
run: composer lint

- name: PHP test
- name: PHPStan
run: composer phpstan

- name: PHPMD
run: composer phpmd

- name: WordPress unit test
run: composer test:unit
3 changes: 2 additions & 1 deletion .wp-env.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"core": null,
"plugins": ["."]
"plugins": ["."],
"phpVersion": "8.3"
}