From a1dc6e3e895b5a86bbe0f86d364159497be70379 Mon Sep 17 00:00:00 2001 From: David Stone Date: Tue, 24 Mar 2026 20:54:42 -0600 Subject: [PATCH 1/3] feat: add WP Performance Action to unit test workflow Adds swissspidy/wp-performance-action@v2 as a new job in the Unit & Integration Tests workflow. The job runs WordPress Playground-based performance tests measuring Lighthouse scores and Server-Timing metrics for the plugin on every push and pull request. - Posts results as PR comments (on pull_request events) - Prints results to the GitHub Actions job summary - Uploads raw results as workflow artifacts Closes #78 --- .github/workflows/tests.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 36d7f568f..efa0c8797 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -94,3 +94,21 @@ jobs: fail_ci_if_error: false env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + + wp-performance: + name: WP Performance Metrics + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Run WP Performance Tests + uses: swissspidy/wp-performance-action@v2 + with: + plugins: | + ./ + urls: | + / + create-comment: ${{ github.event_name == 'pull_request' }} + print-results: true + upload-artifacts: true From 13206f9c10b1f0d9537064290bb40d6fe70cb58b Mon Sep 17 00:00:00 2001 From: David Stone Date: Tue, 24 Mar 2026 20:58:58 -0600 Subject: [PATCH 2/3] fix: skip PHPCS/PHPStan annotation steps when no PHP files changed The annotation steps ran unconditionally on all PRs, but the report files are only created when PHP files are changed. PRs touching only non-PHP files (e.g. YAML, Markdown) caused the annotator to fail with a missing-file error. Guard the annotation steps with the same condition as the analysis steps. --- .github/workflows/code-quality.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/code-quality.yml b/.github/workflows/code-quality.yml index 0114cbe46..5803abdc1 100644 --- a/.github/workflows/code-quality.yml +++ b/.github/workflows/code-quality.yml @@ -46,7 +46,7 @@ jobs: - name: Annotate PR with PHPCS results uses: staabm/annotate-pull-request-from-checkstyle-action@v1 - if: github.event_name == 'pull_request' + if: github.event_name == 'pull_request' && steps.changed-files.outputs.any_changed == 'true' with: files: phpcs-report.xml graceful-warnings: true @@ -54,7 +54,7 @@ jobs: - name: Annotate PR with PHPStan results uses: staabm/annotate-pull-request-from-checkstyle-action@v1 - if: github.event_name == 'pull_request' + if: github.event_name == 'pull_request' && steps.changed-files.outputs.any_changed == 'true' with: files: phpstan-report.xml graceful-warnings: true From 00ddf816dbb770e201db02a1967a4505d3cce0da Mon Sep 17 00:00:00 2001 From: David Stone Date: Tue, 24 Mar 2026 21:06:55 -0600 Subject: [PATCH 3/3] fix: mark wp-performance job as continue-on-error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Performance metrics are informational — a transient failure (network timeout downloading WordPress, Playground startup issue) should not block the overall CI run. Results are still posted to the job summary and uploaded as artifacts when the job succeeds. --- .github/workflows/tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index efa0c8797..fb53ece87 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -98,6 +98,7 @@ jobs: wp-performance: name: WP Performance Metrics runs-on: ubuntu-latest + continue-on-error: true steps: - name: Checkout uses: actions/checkout@v4