-
Notifications
You must be signed in to change notification settings - Fork 69
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
Exploration: Playwright GH action workflow #7922
Exploration: Playwright GH action workflow #7922
Conversation
Test the buildOption 1. Jetpack Beta
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:
Note: the build is updated when a new commit is pushed to this PR. |
Size Change: 0 B Total Size: 1.27 MB ℹ️ View Unchanged
|
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.
To clarify, is that just a PR for setting up the foundation to have a working workflow that we can rely upon to run Playwright tests?
I'm sure there are syntax differences on the way to write tests, so we can't just start running tests with this PR, right? Just checking, the PR description made me think that the PR would allow us to run the tests already
Anyway, thanks for exploring this 👍
path: ${{ env.WCPAY_ARTIFACT_DIRECTORY }} | ||
|
||
- name: Setup E2E environment | ||
uses: ./.github/actions/e2e-pw/env-setup |
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.
uses: ./.github/actions/e2e-pw/env-setup | |
uses: ./.github/actions/e2e/env-setup |
I think we can reuse the ./.github/actions/e2e/env-setup
composite action, and add the specific PW step for installing it right after, instead of creating a new env-setup action from scratch.
- name: Install Playwright
shell: bash
run: |
echo "::group::Install Playwright"
npx playwright install
echo "::endgroup::"
Or do you foresee any more specific setup to be done for PW, beside installing it (which should be done automatically when we add the playwright dependency in our package.json; why haven't we added playwright as dev dependency in that PR?)?
In any case, the e2e-pw
composite action could run the ./.github/actions/e2e/env-setup
and add specific steps after, if we really want to encapsulate the whole PW setup thing in a different file
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.
why haven't we added playwright as dev dependency in that PR?
@playwright/test
is installed as a dev dependency, but it seems that Playwright needs to run an additional browser installation step with npx playwright install
(see docs).
woocommerce-payments/package.json
Line 87 in d98d705
"@playwright/test": "1.39.0", |
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.
we can reuse the
./.github/actions/e2e/env-setup
composite action
I've made this change in 83c1e6b and added the specific Playwright install step.
Sorry for the confusion! This (and PR #7671) has only explored the foundation, running the few Playwright tests added to the |
Co-authored-by: Jordan Bordonado <[email protected]>
I'll merge this into #7671 to simplify the work-in-progress into one PR. |
Based on PR #7671
This PR is an initial attempt/exploration to get Playwright tests running in GH actions, consistent with the existing e2e workflow files.
Note this doesn't run Puppeteer spec files, only the few example Playwright tests from the
e2e-pw
dir.Outputs the following Playwright HTML report as a GH action artefact (see this workflow run):
Testing instructions
E2E Playwright Tests
.npm run changelog
to add a changelog file, choosepatch
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.Post merge