run workflow only if modified file matches the configured paths#4919
run workflow only if modified file matches the configured paths#4919morozov merged 1 commit intodoctrine:2.13.xfrom
Conversation
There was a problem hiding this comment.
A good way to validate the completeness of the paths might be to use strace, run the jobs locally (each tool once) and see what files they actually use or even attempt to use. For instance:
$ strace cat test.php 2>&1 | grep openat
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/usr/lib/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "test.php", O_RDONLY) = 3
Then disregard all the paths that don't belong to the project. Here, we can see that cat test.php depends on test.php.
| paths: | ||
| - "src/**" | ||
| - "bin/**" | ||
| - "tests/**" |
There was a problem hiding this comment.
Would it be possible to get rid of the duplication of the paths for each workflow?
There was a problem hiding this comment.
@marulitua please do not resolve the conversations that you didn't start. What's the resolution on this one?
|
@morozov Can you check on my update |
morozov
left a comment
There was a problem hiding this comment.
Content-wise looks good. Please retarget against 2.13.x since it's relevant there as well. You'll have to replace src/ with lib/ there.
| paths: | ||
| - "src/**" | ||
| - "bin/**" | ||
| - "tests/**" |
There was a problem hiding this comment.
@marulitua please do not resolve the conversations that you didn't start. What's the resolution on this one?
35ff43c to
d4e030d
Compare
|
Hmm… it looks like required jobs remain required even if they are skipped. Now I see that in Debezium where I spotted this approach, they don't mark any of the jobs as required. @greg0ire do you think it will be safe to leave the status check to the maintainer's discretion? Another thing is that the AppVeyor build still runs unconditionally. It would be a bummer not to optimize it as well since it's one of the slowest jobs (especially, in the older branches like |
If we have to choose between both features I think it's best to pick the |
Agree. Do you know where this could be reported? |
|
It should be possible to apply this to AppVeyor as well (reference). |
Well, there is this feedback form, and otherwise you have https://github.community/ which will provide workarounds . Neither will feel like a great way of reporting this I'm afraid. |
|
Submitted to both (ref). |
|
this misses one path: the workflow file itself. |
d4e030d to
c68da38
Compare
|
I believe we can tackle the AppVeyor part later. Thanks, @marulitua! |
Summary
static analysis:
continuous integration:
coding standards: