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

Change build dir to be under GITHUB_WORKSPACE #21

Open
Vinai opened this issue Jan 7, 2021 · 3 comments
Open

Change build dir to be under GITHUB_WORKSPACE #21

Vinai opened this issue Jan 7, 2021 · 3 comments
Assignees

Comments

@Vinai
Copy link

Vinai commented Jan 7, 2021

Additional action steps are unable to access the Magento build that is local to the /tmp/m2 directory.

Proposed solution:

  1. Check out the module source to a subdirectory of GITHUB_WORKSPACE, e.g. $GITHUB_WORKSPACE/source.
  2. Change the build directory to $GITHUB_WORKSPACE/build.

This already seems to have been intended at one point of time according to the otherwise unused $MODULE_SOURCE variable when the local-source is set up.

This would allow adding additional steps that can reference the existing build.

@fooman
Copy link
Contributor

fooman commented Jan 8, 2021

Hey @Vinai thanks for giving these actions a try and your feedback.

Just to confirm that I understand this issue correctly. You are currently running the integration test action from this repo and then you want to use a separate github action after it that should work with the M2 set up by this action?

Happy to go ahead with the suggested folder changes. @jissereitsma any concerns?

@Vinai
Copy link
Author

Vinai commented Jan 8, 2021

@fooman You are correct.
To make it more concrete, in my case, I wanted to run rector on the module and then run the tests again with a different PHP version.
Executing rector required running static:content:deploy, which in turn requires a complete install.
This would be possible by adding another step to the workflow that reuses the existing installation.

My only concern is that making these changes maybe could break existing workflows?
Maybe the build dir should only be inside the workspace if a $BUILD_DIR environment input is set, and if it isn't set, the default /tmp/m2 is used and the workspace is the module source?

@fooman
Copy link
Contributor

fooman commented Jan 9, 2021

My only concern is that making these changes maybe could break existing workflows?

It's still early days for these actions. A quick search over all of github did not yield any repos that would rely on this internal implementation detail. (most of these repos are ExtDN related). Technically there could be private ones that I do not see but again I am somewhat confident that relying on /tmp/m2 vs the MAGE_ROOT that we already have is highly unlikely.

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

No branches or pull requests

3 participants