From ac2f45bb939bdc8890f7738bb0ed9fe454c2368e Mon Sep 17 00:00:00 2001 From: Colin Murphy Date: Thu, 26 Jun 2025 14:03:13 +0100 Subject: [PATCH 1/2] Fixes for pre-release process. Updated testing docs for previews --- .github/workflows/pre-release-tag.yml | 4 ++-- plugins/hwp-previews/TESTING.md | 16 ++++++++++++++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pre-release-tag.yml b/.github/workflows/pre-release-tag.yml index c17f22e9..7e5d94ea 100644 --- a/.github/workflows/pre-release-tag.yml +++ b/.github/workflows/pre-release-tag.yml @@ -126,8 +126,8 @@ jobs: - name: Create plugin archive working-directory: ${{ steps.metadata.outputs.PLUGIN_DIR }} run: | - mkdir -p plugin-build - composer archive --format=zip --file="plugin-build/${{ steps.plugin.outputs.plugin_slug }}.zip" + rm -f plugin-build/${{ steps.plugin.outputs.plugin_slug }}.-*.zip + composer archive -vvv --format=zip --file="plugin-build/${{ steps.plugin.outputs.plugin_slug }}" --dir="." # Verify archive was created if [ ! -f "plugin-build/${{ steps.plugin.outputs.plugin_slug }}.zip" ]; then diff --git a/plugins/hwp-previews/TESTING.md b/plugins/hwp-previews/TESTING.md index df0978ee..a11c6496 100644 --- a/plugins/hwp-previews/TESTING.md +++ b/plugins/hwp-previews/TESTING.md @@ -61,10 +61,22 @@ Currently the plugin has the following suite of tests ### WPUnit (WordPress-aware Unit/Integration) Tests -Run WPUnit tests (WordPress loaded): +You can also run WPUnit tests using Composer scripts: ```bash -sh bin/local/run-unit-tests.sh coverage +composer run test:unit +``` + +To generate coverage reports: + +```bash +composer run test:unit:coverage +``` + +To generate an HTML coverage report: + +```bash +composer run test:unit:coverage-html ``` > [!IMPORTANT] From 9e3e968c2cb8e09071a80f096a3a1f4b65aaba81 Mon Sep 17 00:00:00 2001 From: Colin Murphy Date: Thu, 26 Jun 2025 14:04:24 +0100 Subject: [PATCH 2/2] Added Changeset --- .changeset/grumpy-kangaroos-allow.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/grumpy-kangaroos-allow.md diff --git a/.changeset/grumpy-kangaroos-allow.md b/.changeset/grumpy-kangaroos-allow.md new file mode 100644 index 00000000..12084181 --- /dev/null +++ b/.changeset/grumpy-kangaroos-allow.md @@ -0,0 +1,5 @@ +--- +"@wpengine/hwp-previews-wordpress-plugin": patch +--- + +chore: Updated testing docs to trigger workflow process.