From e5c4d81e3e49cf7eb398b02a5f4a20d0a33770b9 Mon Sep 17 00:00:00 2001 From: Aleksei Tikhomirov Date: Tue, 4 Aug 2026 03:04:57 +0300 Subject: [PATCH] fix: make plugin quality gate CI-compatible Co-Authored-By: Claude --- .github/workflows/test.yml | 19 ++++++++++++++----- composer.json | 7 ++++++- tests/Unit/LazyLoadingTest.php | 2 -- 3 files changed, 20 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d2415ff..d6527fe 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -32,14 +32,17 @@ jobs: uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php }} - extensions: pdo, pdo_mysql, mbstring, intl, zip + extensions: pdo, pdo_mysql, mbstring, intl, zip, dom, gd, xml coverage: xdebug tools: composer:v2 - name: Cache Composer dependencies - uses: actions/cache@v3 + uses: actions/cache@v4 with: - path: vendor + path: | + vendor + .pint.cache + .phpstan/cache key: ${{ runner.os }}-php-${{ matrix.php }}-composer-${{ hashFiles('**/composer.lock') }} restore-keys: | ${{ runner.os }}-php-${{ matrix.php }}-composer- @@ -74,8 +77,14 @@ jobs: cd /tmp/wordpress-develop php tests/phpunit/includes/install.php wp-tests-config.php - - name: Run quality checks - run: composer quality + - name: Check code style + run: composer format:check + + - name: Run static analysis + run: composer static-analysis + + - name: Run tests + run: composer test - name: Run tests with coverage run: composer test:coverage diff --git a/composer.json b/composer.json index 0e18765..cbb6f72 100644 --- a/composer.json +++ b/composer.json @@ -35,7 +35,12 @@ "format": "pint", "format:check": "pint --test", "static-analysis": "phpstan analyse --memory-limit=1G", - "quality": "@composer validate --strict && @format:check && @static-analysis && @test" + "quality": [ + "composer validate --strict", + "@format:check", + "@static-analysis", + "@test" + ] }, "config": { "allow-plugins": { diff --git a/tests/Unit/LazyLoadingTest.php b/tests/Unit/LazyLoadingTest.php index eb7de43..3840a29 100644 --- a/tests/Unit/LazyLoadingTest.php +++ b/tests/Unit/LazyLoadingTest.php @@ -1,7 +1,5 @@