The matrix strategy has a bug when using the if condition. When the job is skipped due to the condition, it marks the "parent" job as Skipped, but when the jobs run, it marks the "child" jobs as Successful.
If the if condition is skipped, I'm going to see Integration tests as Skipped in the PR's check else I'm going to see Integration tests (ubuntu-latest) and Integration tests (ubuntu-latest) as Successful. The problem here is that if I configure Integration tests (ubuntu-latest) and Integration tests (ubuntu-latest) jobs as required and the if condition is skipped I'm unable to merge the PR, but skipped required jobs allows us to merge the PR. So I had to duplicate the configuration (use runs-on for each OS instead of using the matrix strategy) above to make it work, eg:
I expected to see Integration tests (ubuntu-latest) and Integration tests (macos-latest) as Skipped instead of Integration tests so I wouldn't need to duplicate the configuration
Describe the bug
The matrix strategy has a bug when using the
if
condition. When the job is skipped due to the condition, it marks the "parent" job asSkipped
, but when the jobs run, it marks the "child" jobs asSuccessful
.To Reproduce
For instance the job below:
If the
if
condition is skipped, I'm going to seeIntegration tests
asSkipped
in the PR's check else I'm going to seeIntegration tests (ubuntu-latest)
andIntegration tests (ubuntu-latest)
asSuccessful
. The problem here is that if I configureIntegration tests (ubuntu-latest)
andIntegration tests (ubuntu-latest)
jobs asrequired
and theif
condition is skipped I'm unable to merge the PR, but skipped required jobs allows us to merge the PR. So I had to duplicate the configuration (useruns-on
for each OS instead of using the matrix strategy) above to make it work, eg:Expected behavior
I expected to see
Integration tests (ubuntu-latest)
andIntegration tests (macos-latest)
asSkipped
instead ofIntegration tests
so I wouldn't need to duplicate the configurationRunner Version and Platform
Version of your runner? 20230619.1.0
OS of the machine running the runner? OSX/Linux/
What's not working?
Not applicable
Job Log Output
Not applicable
Runner and Worker's Diagnostic Logs
Not applicable