woocommerce / qit-cli

A Testing Platform for WordPress Plugins and Themes
https://qit.woo.com
15 stars 2 forks source link

Add `woo:validate-zip <path>` command #163

Closed rcstr closed 4 months ago

rcstr commented 4 months ago

Part of https://github.com/Automattic/woocommerce.com/issues/20009

Description

PR adds a basic zip file validation command. Validation is based on:

https://github.com/Automattic/woocommerce.com/pull/20050/files#diff-d1f39d6ef6800717504f5c7dffecf7a012b52659250ba19e7b84f5dbba532c83R120-R126

Testing instructions

  1. Checkout branch
  2. Use https://github.com/Automattic/woocommerce.com/pull/20050/files?show-viewed-files=true&file-filters%5B%5D=#diff-839d4fbb14d0686c8ed4cc751e54a9d9a5b586bfabc494cfcd68f0ff53b27ed4 and https://github.com/Automattic/woocommerce.com/pull/20050/files?show-viewed-files=true&file-filters%5B%5D=#diff-36f515fa8eb2124c6844a1ab812d106ab7c677b1973b19e03c721704a518fa39 folders to generate invalid zip files
  3. Run make build
  4. To run the command, use woo:validate-zip <path>. Where <path> is the path for the zip file, eg woo:validate-zip /Users/rommel/Projects/woocommerce.com/tests/integration/data/plugins/invalid-file-inside.zip

Screenshots

Screenshot 2024-05-03 at 04 07 09
rcstr commented 4 months ago

@Luc45 - thanks for the review. I have handled your points: