-
Couldn't load subscription status.
- Fork 217
Add manual GitHub workflow for running e2e tests for a specific branch #4727
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add manual GitHub workflow for running e2e tests for a specific branch #4727
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds a manual GitHub workflow to trigger end-to-end tests for specific branches, enabling verification of e2e test functionality against specific WooCommerce versions and release branches in a client-agnostic way.
- Added a new manual workflow for triggering e2e tests with configurable parameters
- Enhanced the existing reusable e2e workflow to support branch/tag/SHA checkout
- Provided input options for WordPress version, WooCommerce version, and PHP version selection
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
.github/workflows/run-e2e-tests.yml |
Added branch input parameter and checkout reference support |
.github/workflows/manual-e2e-tests.yml |
Created new manual workflow with configurable test parameters |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| @@ -0,0 +1,40 @@ | |||
|
|
|||
Copilot
AI
Oct 14, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the empty line at the beginning of the file. YAML files should start with content, not blank lines.
| description: WordPress version number. Leave empty to use the latest version. | ||
| type: string | ||
| default: 'latest' | ||
| required: true | ||
| woocommerce-version: | ||
| description: WooCommerce version number. Leave empty to use the latest version. |
Copilot
AI
Oct 14, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The descriptions mention 'Leave empty to use the latest version' but both fields have default values of 'latest' and are marked as required. The descriptions should be updated to reflect that 'latest' is the default value.
| description: WordPress version number. Leave empty to use the latest version. | |
| type: string | |
| default: 'latest' | |
| required: true | |
| woocommerce-version: | |
| description: WooCommerce version number. Leave empty to use the latest version. | |
| description: WordPress version number. Defaults to 'latest'. | |
| type: string | |
| default: 'latest' | |
| required: true | |
| woocommerce-version: | |
| description: WooCommerce version number. Defaults to 'latest'. |
| type: string | ||
| default: 'latest' | ||
| required: true | ||
| php-version: |
Copilot
AI
Oct 14, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The php-version input is missing a description field, unlike the other inputs. Add a description to maintain consistency.
| php-version: | |
| php-version: | |
| description: PHP version number. Leave empty to use the default version. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Useful feature, Dale. Thank you. Looks good! 👍
Co-authored-by: Copilot <[email protected]>
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| branch: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think the branch input is needed, workflow_dispatch always asks for a branch to run from.
Maybe we can update the .github/workflows/run-e2e-tests.yml flow to allow workflow_dispatch.
For example, the Generate ZIP file flow allows you to choose a branch.
Action code: https://github.com/woocommerce/woocommerce-gateway-stripe/blob/develop/.github/workflows/generate-zip.yml
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe that selection actually does something different: it controls which version of the workflow file to use when running the workflow. It then has the side-effect that the default SHA/ref will be the same as that branch (as far as I understand the docs for workflow_dispatch actions.
However, that implicit expectation feels a bit shaky to me, as my assumption is that we should generally run the most current version of the workflow and only use the target branch for the code. Similarly, when we're testing adjustments to the workflow, we would want to run the workflow code from a specific branch and may want to specify other target branches to use for the contents of the main codebase.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to have the workflow in the default branch to be able to trigger it... But when you do, it uses the actual yml file from the branch you select in Use workflow from.
I think that having two branch inputs would be confusing 🤔 , but let's merge this so we can test it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the scepticism. Let's see what this look like.
Changes proposed in this Pull Request:
This PR is intended to start the work of creating a way to trigger all e2e tests for a specific branch in a standard way, with two primary workflows of interest:
This makes it possible to trigger the necessary tests in a completely client-agnostic way.
Testing instructions
Testing for this will only be possible after the PR has been merged, as we don't have the workflow in place to trigger it manually yet.
So for now the only thing we can do is inspect the code.
Changelog entry
Changelog Entry Comment
Comment
This PR only impacts our GitHub configuration and not any merchant-facing features. I don't think we should include the details in the changelog.
Post merge