feat: automatic module directories #1315
Merged
+542
−276
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds an experimental option (
experimental: "automatic-module-directories") to automatically detect the modules inside mono-repos.The launches of the run are not in parallel because this would create a real mess in the logs.
The GitHub Action jobs are not made to run in parallel outside the matrix system.
This is an experimental feature because I don't know the performance of NodeJS to walk the directory tree to detect
go.modfiles.If the performances are not good enough, another possibility is to create an option (
module-directories) to define the directories.But actions don't support arrays as inputs, so it will be a comma-separated string.
In this case, because it will be challenging to have something portable on all operating systems,
the users will have to manually define the module directories or use something external (ex,
find . -name go.mod -exec readlink -f {} \; | xargs -I{} dirname {} | paste -sd,)Related to #1226
Related to #74