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

Try using workflow from wporg-repo-tools #275

Merged
merged 7 commits into from
Aug 24, 2023
Merged

Conversation

ryelle
Copy link
Contributor

@ryelle ryelle commented Jul 5, 2023

See WordPress/wporg-repo-tools#26 — this demonstrates updating the actions to use the shared composite actions.

This is still a draft because if WordPress/wporg-repo-tools#29 merges, we'll need to update the action paths to remove the branch name.

@ryelle
Copy link
Contributor Author

ryelle commented Jul 27, 2023

I've requested review on this, even though it's a draft, as part of the work on WordPress/wporg-repo-tools#29.

Copy link
Contributor

@adamwoodnz adamwoodnz left a comment

Choose a reason for hiding this comment

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

Looks like the workflows ran correctly on the branch, except for build obviously. Just one comment.

with:
ref: trunk

- name: Setup
Copy link
Contributor

Choose a reason for hiding this comment

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

I guess we won't see this workflow run until merged. Noting there are a couple of extra steps in Setup which don't currently run on build; 'Setup PHP with PECL extension' and 'Setup configs'.

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh looks like 'Setup configs' covers the removed setup:tools call

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Setup PHP with PECL extension

Previously it was just using the PHP/composer that exist on the container, but "Setup PHP with PECL extension" sets up a specific version & adds the token for composer to use.

Oh looks like 'Setup configs' covers the removed setup:tools call

Yeah, I guess I probably could switch the command in this step to be setup:tools, writing it out explicitly was left over from the original workflow testing. It would add another required script in each project, but I think we're consistently using setup:tools (it would also mean I can remove the textdomain input, since each project's setup:tools should handle that).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I ended up switching to setup:tools in WordPress/wporg-repo-tools@31fdc71, and re-ran the checks, but then it was installing yarn & composer twice. I've updated the local setup:tools command so that all it does is set up the configs, and that works. It means you need to manually run a few more commands to set up the project, but since we'll only be doing that once per project, it should be okay.

Copy link
Contributor

Choose a reason for hiding this comment

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

Could we do the opposite; remove the Install all dependencies step and revert removing the dependency installation from setup:tools?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'd rather not because that makes the setup:tools command pretty complicated, since it would need to do the composer install || composer update wporg/* step… and I'm not actually sure how well that step would join with the yarn command (like, can you just do composer install || composer update wporg/* && yarn or is there an order of operations thing going on).

@ryelle ryelle marked this pull request as ready for review August 24, 2023 18:26
@ryelle
Copy link
Contributor Author

ryelle commented Aug 24, 2023

This is fixing the current build issue in trunk (because the wporg-mu-plugins repo & other dependencies were out of date), so I'm going to merge it.

@ryelle ryelle merged commit c8dc21e into trunk Aug 24, 2023
2 checks passed
@ryelle ryelle deleted the try/reusable-workflow branch August 24, 2023 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants