Skip to content

Conversation

@mgascam
Copy link
Contributor

@mgascam mgascam commented Sep 18, 2025

Fixes #WOOPMNT-5337

This PR bulds on top of #11049. It adds a GitHub Actions workflow for running QIT E2E tests in our CI pipeline.

Changes proposed in this Pull Request

  • Added .github/workflows/qit-e2e.yml to run QIT E2E tests automatically on PRs, pushes to main branches, and daily scheduled runs
  • Tests against WooCommerce stable, L-1 version (8.9.3), and version (7.7.0) with appropriate PHP versions
  • Added manual workflow dispatch with configurable WooCommerce/PHP versions and optional UI mode for debugging

Testing instructions


  • Run npm run changelog to add a changelog file, choose patch to leave it empty if the change is not significant. You can add multiple changelog files in one PR by running this command a few times.
  • Covered with tests (or have a good reason not to test in description ☝️)
  • Tested on mobile (or does not apply)

Post merge

- Introduced WP-CLI commands for QIT setup and status checks to assist in development environments.
- Created a new class `WP_CLI_QIT_Dev_Command` for handling Jetpack connection setup and account data refresh.
- Added E2E test runner script and configuration for QIT, including basic tests for WooCommerce Payments functionality.
- Updated package.json to include a new script for running QIT E2E tests.
- Enhanced default environment configuration for QIT testing with necessary credentials.
- Implemented setup script for WooCommerce Payments E2E tests to configure products, customers, and Jetpack connections.
- Added ESLint configuration for E2E tests to accommodate Playwright testing framework.
- Created initial E2E test cases to verify basic functionality and plugin activation.
…nce setup functions, and add connection validation tests
- Add .github/workflows/qit-e2e.yml with comprehensive CI setup
- Support multiple WooCommerce and PHP version combinations
- Enable manual workflow dispatch with custom parameters
- Update e2e-runner.sh to handle CI environment options
- Add CI.md documentation explaining workflow usage and setup

The workflow runs on PR, push to main branches, scheduled, and manual dispatch.
Includes proper authentication and environment variable handling for CI context.
Security improvements:
- Add GitHub Actions log masking for all sensitive tokens
- Use environment variables instead of command-line arguments in WP-CLI
- Update WP_CLI_QIT_Dev_Command to prioritize env vars over CLI args
- Remove tokens from command-line to prevent exposure in process lists
- Add comprehensive security documentation and best practices

This prevents token leakage through:
- Process lists (ps aux)
- Command history
- GitHub Actions logs
- Error output and debugging info

All tests continue to pass with enhanced security measures.
@botwoo
Copy link
Collaborator

botwoo commented Sep 18, 2025

Test the build

Option 1. Jetpack Beta

  • Install and activate Jetpack Beta.
  • Use this build by searching for PR number 11054 or branch name dev/qit-e2e-workflows in your-test.site/wp-admin/admin.php?page=jetpack-beta&plugin=woocommerce-payments

Option 2. Jurassic Ninja - available for logged-in A12s

🚀 Launch a JN site with this branch 🚀

ℹ️ Install this Tampermonkey script to get more options.


Build info:

  • Latest commit: 991e3fe
  • Build time: 2025-10-10 14:41:21 UTC

Note: the build is updated when a new commit is pushed to this PR.

@mgascam mgascam force-pushed the dev/qit-e2e-workflows branch from 6efa26e to 07efbd5 Compare September 18, 2025 15:18
@mgascam mgascam force-pushed the dev/qit-e2e-workflows branch from ea9f527 to c12814c Compare September 18, 2025 16:07
@mgascam mgascam changed the title [WIP][QIT] Add Github workflows to run E2E tests with QIT [E2E][QIT] Add GitHub Actions workflow for QIT E2E tests in CI Sep 18, 2025
@mgascam mgascam marked this pull request as ready for review September 18, 2025 16:23
@mgascam mgascam requested a review from a team September 18, 2025 16:24
@rtio
Copy link
Member

rtio commented Sep 26, 2025

and daily scheduled runs

if they fail against develop, can we get an alert on Slack?

@mgascam mgascam force-pushed the dev/qit-e2e-workflows branch from 556fca6 to c3134c8 Compare October 6, 2025 09:00
Base automatically changed from dev/qit-e2e-basic-checkout to develop November 10, 2025 17:42
@mgascam
Copy link
Contributor Author

mgascam commented Nov 11, 2025

Closing in favor of #11082

@mgascam mgascam closed this Nov 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants