diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index 4716d71..36d3190 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -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 diff --git a/.wp-env.json b/.wp-env.json index 1354cad..2a95c30 100644 --- a/.wp-env.json +++ b/.wp-env.json @@ -1,4 +1,5 @@ { "core": null, - "plugins": ["."] + "plugins": ["."], + "phpVersion": "8.3" }