Open thelovekesh opened 9 months ago
I presume you'll be opening separate PRs for each tasks for review?
Yes, that would be like:
Some quick thoughts on https://github.com/thelovekesh/performance/pull/2 after taking another look:
.github/release.yml
is not needed. We don't currently use GitHub's auto-generated release notes feature.determine-file-counts
logic seems a bit overkill and adds complexity. Do we really need that?Thanks, @swissspidy for taking a look. Here are my few observations:
.github/release.yml is not needed. We don't currently use GitHub's auto-generated release notes feature.
Since we are going to add @dependabot && if we ever require to use the GitHub notes release feature, this config can come in handy. We can skip adding it, but I don't see any problem in keeping it too.
The whole determine-file-counts logic seems a bit overkill and adds complexity. Do we really need that?
Currently, there are standalone workflow files for JS and PHP that do the same tasks like linting, testing, etc. Let's say tomorrow we need to add linting for MD files, will we be adding a new workflow file for that? I think it is better to consolidate all linting tasks in a single file, testing tasks in a single file, and so on. The above logic can help determine change paths on the job level which is a well-used thing in multiple projects.
What's the cache busting for. Never had to use something like that in a project before. Why is it needed here?
I think GitHub doesn't delete a cache if it's being used frequently. The above workflow busts that cache weekly.
if we ever require to use the GitHub notes release feature, this config can come in handy. We can skip adding it, but I don't see any problem in keeping it too.
It's a misleading to have a config file for a feature that's not being used. It's like dead code. We can just add it when we need it.
I think it is better to consolidate all linting tasks in a single file, testing tasks in a single file, and so on.
Not disagreeing with that part. Consolidating makes sense. And I understand why you added the logic for determining changed files etc. But do we really need it? What's the drawback of not adding it? Will the workflows really be that slower?
What's the drawback of not adding it? Will the workflows really be that slower?
I think it's about running relevant workflows on the changes made in a PR. If the changes are only JS, do we need to run other workflows for like 1-2 minutes(for linting) and maybe 3-4 minutes(for testing)? while the logic for determining changed files only takes 2-3 seconds.
I have found some issues in wp-env
based unit tests setup where it seems like Imagick is not working as expected. See https://github.com/WordPress/performance/pull/1013#issuecomment-1962731568
/cc @westonruter @swissspidy @mukeshpanchal27 @joemcgill for visibility
Sounds like we can make the tests more robust, good :)
Created https://github.com/WordPress/performance/issues/1085 to discuss task 4 of this issue more widely. cc @swissspidy for visibility.
I have found some issues in
wp-env
based unit tests setup where it seems like Imagick is not working as expected. See #1013 (comment)
can we use GD instead of Imagick to address this?
I think there are some dedicated unit tests for both GD and Imagick, so ideally we have a setup that has both
An initial Dependabot config was added by @mukeshpanchal27 in https://github.com/WordPress/performance/pull/1355
Currently, there are a few areas where workflows can be optimized to reduce CI times, maintenance, and security in the runners. Also, consider adding tools like @dependabot that can keep the dependency up-to-date unless some dependency requires it, for example:
chalk
since it's pure ESM now and the plugin CLI is CJS.Tasks
composer
,npm
, andgithub-actions
at least once a month.