Skip to content
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

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

Merged
merged 8 commits into from
May 24, 2021

Conversation

pierlon
Copy link
Contributor

@pierlon pierlon commented May 19, 2021

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
@@ -28,7 +28,7 @@ services:
command: tail -f /dev/null

mysql:
image: mysql:5.7
image: mariadb:10
Copy link
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.

@@ -59,7 +59,7 @@
"@wordpress/hooks": "2.12.3",
"@wordpress/jest-puppeteer-axe": "3.0.3",
"@wordpress/plugins": "3.0.0",
"@wordpress/scripts": "15.0.1",
"@wordpress/scripts": "16.0.0",
Copy link
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 westonruter and delawski 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
Copy link
Contributor

github-actions bot commented May 19, 2021

Plugin builds for 2e14cbc are ready 🛎️!

@pierlon
Copy link
Contributor Author

pierlon commented May 19, 2021

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
Copy link
Contributor Author

pierlon commented May 21, 2021

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.

Copy link
Collaborator

@delawski delawski left a comment

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
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
Copy link
Contributor Author

pierlon commented May 24, 2021

@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
Member

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

@pierlon
Copy link
Contributor Author

pierlon commented May 24, 2021

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
Member

So we should wait for Gutenberg 10.7 to be released?

@pierlon
Copy link
Contributor Author

pierlon commented May 24, 2021

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

@westonruter
Copy link
Member

But we currently have trunk as a required check.

@pierlon
Copy link
Contributor Author

pierlon commented May 24, 2021

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
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
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