Skip to content

Make E2E env setup more robust; add GHA reporter for E2E and JS unit tests - #6280

Merged
westonruter merged 8 commits into
developfrom
update/e2e-environment
May 24, 2021
Merged

westonruter merged 8 commits into
developfrom
update/e2e-environment

Conversation

@pierlon

@pierlon pierlon commented May 19, 2021 •

Copy link
Copy Markdown
Contributor

Summary

  • Adds a GitHub Action reporter to Jest unit and E2E configs
  • Clean up AMP settings and trash all posts before running E2E tests

Checklist

  • My code is tested and passes existing tests.
  • My code follows the Engineering Guidelines (updates are often made to the guidelines, check it out periodically).

@pierlon
pierlon force-pushed the update/e2e-environment branch from 16e4e06 to 46d1826 Compare May 19, 2021 18:39
@pierlon pierlon changed the title Import reference site for use in E2E tests Make E2E env setup more robust; add GHA reporter for E2E and JS unit tests May 19, 2021

mysql:
image: mysql:5.7
image: mariadb:10

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The mysql Docker image doesn't have an arm64 compatible build yet, but mariadb does so I went with that.

Comment thread package.json
"@wordpress/jest-puppeteer-axe": "3.0.3",
"@wordpress/plugins": "3.0.0",
"@wordpress/scripts": "15.0.1",
"@wordpress/scripts": "16.0.0",

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated @wordpress/scripts to v16 as it uses puppeteer-core v9, which has support for Apple M1.

@pierlon
pierlon marked this pull request as ready for review May 19, 2021 18:48
@pierlon
pierlon requested review from delawski and westonruter May 19, 2021 18:48
@pierlon pierlon self-assigned this May 19, 2021
@pierlon pierlon added Infrastructure Changes impacting testing infrastructure or build tooling Testing Issues related with Unit, E2E, Smoke, and other testing requirements/needs labels May 19, 2021
@pierlon pierlon added this to the v2.1.3 milestone May 19, 2021
@github-actions

github-actions Bot commented May 19, 2021 •

Copy link
Copy Markdown
Contributor

Plugin builds for 2e14cbc are ready 🛎️!

@pierlon

pierlon commented May 19, 2021

Copy link
Copy Markdown
Contributor Author

The "Unit test: PHP 8.0, WP trunk" PR check is currently failing with:

PHP Fatal error: Cannot redeclare construct_wp_query_args() (previously declared in /tmp/wordpress/src/wp-includes/blocks.php:978) in /tmp/wordpress/src/wp-content/plugins/gutenberg/lib/query-utils.php on line 20

I see that WordPress/gutenberg#32008 was merged recently to resolve the issue, and should be apart of Gutenberg v10.7 set to be released today (according to the milestone due date).

@pierlon

pierlon commented May 21, 2021

Copy link
Copy Markdown
Contributor Author

I see that WordPress/gutenberg#32008 was merged recently to resolve the issue...

Bug fix was shipped as apart of the 10.6.2 release: https://github.com/WordPress/gutenberg/releases/tag/v10.6.2.

@delawski delawski left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes look well to me. I've tried out the E2E tests locally and they work as expected.

@westonruter

Copy link
Copy Markdown
Member

@pierlon Is the Percy failure due to there not being a previous snapshot to compare against?

@westonruter
westonruter enabled auto-merge May 24, 2021 18:11
@pierlon

pierlon commented May 24, 2021

Copy link
Copy Markdown
Contributor Author

@westonruter It seems to be due to the work being done in #6282 since that PR is using this branch as the base. It can be ignored for now.

# Conflicts:
#	package-lock.json
@westonruter

Copy link
Copy Markdown
Member

Cool. The conflicts in package-lock.json just need to be resolved.

@pierlon

pierlon commented May 24, 2021 •

Copy link
Copy Markdown
Contributor Author

The "Build, test & measure / Unit test: PHP 8.0, WP trunk" PR check is failing once again, but with a different error:

PHP Fatal error: Cannot declare class WP_Theme_JSON, because the name is already in use in /tmp/wordpress/src/wp-content/plugins/gutenberg/lib/class-wp-theme-json.php on line 12

We can ignore that error for now as it has been resolved via WordPress/gutenberg#32059 and should be available in the upcoming Gutenberg 10.7 release.

@westonruter

Copy link
Copy Markdown
Member

So we should wait for Gutenberg 10.7 to be released?

@pierlon

pierlon commented May 24, 2021

Copy link
Copy Markdown
Contributor Author

Nope, shouldn't be considered a blocker since this issue only occurs on WP trunk.

@westonruter

Copy link
Copy Markdown
Member

But we currently have trunk as a required check.

@pierlon

pierlon commented May 24, 2021

Copy link
Copy Markdown
Contributor Author

I don't think that should be the case since it's expected that tests will fail from time to time, especially in this case where the failure is due to external factors not related to the plugin.

@westonruter
westonruter disabled auto-merge May 24, 2021 22:16
@westonruter

Copy link
Copy Markdown
Member

OK, I removed trunk from the checks required to pass.

@westonruter
westonruter merged commit 9e4da4d into develop May 24, 2021
@westonruter
westonruter deleted the update/e2e-environment branch May 24, 2021 22:16
@westonruter westonruter modified the milestones: v2.1.3, v2.2 May 24, 2021
@westonruter

Copy link
Copy Markdown
Member

Moving this to 2.2 as I don't think we need this on the 2.1 branch.

@westonruter westonruter added the Changelogged Whether the issue/PR has been added to release notes. label Dec 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Changelogged Whether the issue/PR has been added to release notes. Infrastructure Changes impacting testing infrastructure or build tooling Testing Issues related with Unit, E2E, Smoke, and other testing requirements/needs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants