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. 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]