-
Notifications
You must be signed in to change notification settings - Fork 154
fix: Resolve CI test failures (MySQL container + Jest compatibility) #2223
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
base: canary
Are you sure you want to change the base?
Conversation
|
📦 Next.js Bundle Analysis for @faustwp/getting-started-exampleThis analysis was generated by the Next.js Bundle Analysis action. 🤖
|
| Page | Size (compressed) |
|---|---|
global |
278.08 KB (🟡 +11.71 KB) |
Details
The global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster.
Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis
If you want further insight into what is behind the changes, give @next/bundle-analyzer a try!
One Page Changed Size
The following page changed size from the code in this PR compared to its base branch:
| Page | Size (compressed) | First Load | % of Budget (350 KB) |
|---|---|---|---|
/example |
807 B |
278.87 KB | 79.68% (+/- <0.01%) |
Details
Only the gzipped size is provided here based on an expert tip.
First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.
Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis
The "Budget %" column shows what percentage of your performance budget the First Load total takes up. For example, if your budget was 100kb, and a given page's first load size was 10kb, it would be 10% of your budget. You can also see how much this has increased or decreased compared to the base branch of your PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this. If you see "+/- <0.01%" it means that there was a change in bundle size, but it is a trivial enough amount that it can be ignored.
1b71465 to
e156938
Compare
Updated multiple test files to replace inline snapshot assertions with direct array comparisons for toolbar node content and console log outputs. Removed obsolete Jest snapshot file. These changes improve test clarity and maintainability.
- Pin MySQL to 8.0 to avoid 8.4 breaking changes - Enable mysql_native_password for client compatibility - Reduce test matrix from 7 WP versions to 2 WP × 2 PHP (5 jobs total) - Make PHP version configurable in Docker setup
This pull request introduces several improvements and updates to the testing configuration, dependency management, and CI workflow for the project. The main focus is on modernizing Jest configurations for ESM support, updating dependencies, refining test assertions, and optimizing CI scripts for reliability.
Testing configuration and dependency updates:
packages/blocks/jest.config.js,packages/faustwp-cli/jest.config.js, andpackages/faustwp-core/jest.config.jsto use ESM support viats-jest, removed redundantglobalsentries, and switched coverage provider tov8for better performance and compatibility. Coverage collection is now disabled by default. [1] [2] [3] [4] [5] [6]packages/blocks/package.jsonandpackages/faustwp-core/package.json, including upgradingts-jestto version^29.1.1and adding missing Jest-related type dependencies. [1] [2]Test improvements and snapshot updates:
packages/faustwp-core/tests/components/Toolbar/Toolbar.test.tsxto use direct array equality instead of inline snapshots for improved clarity and maintainability. [1] [2] [3] [4] [5] [6] [7]Continuous Integration workflow improvements:
docker compose execfor MySQL ping, ensuring more reliable DB startup in both nightly and regular plugin unit test jobs. The working directory is now explicitly set for these steps. [1] [2]Miscellaneous:
plugins/faustwp/docker-compose.ymlto align with current Docker Compose best practices.