eventespresso / actions

Centralized repository for all of Event Espresso's GitHub Actions used in our CI/CD pipelines
GNU Affero General Public License v3.0
2 stars 6 forks source link

Allow Tests to Pass if PR has CSS Changes Only #42

Open tn3rb opened 3 years ago

tn3rb commented 3 years ago

If a PR only contains CSS changes (ex: https://github.com/eventespresso/event-espresso-core/pull/3306), the unit tests fail to pass since the PHP tests are waiting for a response:

ScreenShot_20210202122939

Expectation:

Some solution that will allow PR to be merged without requiring admin override if there are only CSS changes, such as:

manzoorwanijk commented 3 years ago

There is currently no easy workaround for that: https://github.community/t/force-succeed-required-workflow-when-skipped/124055

We will have add a condition to every step of each job to make it work but that will be a bit ugly. https://github.community/t/exit-on-success/132524

tn3rb commented 3 years ago

can a workflow return 0 if their file types / folders were unchanged?

manzoorwanijk commented 3 years ago

No, you cannot exit early with 0

tn3rb commented 3 years ago

from the last bullet point in this discussion you linked to:

In the newly filtered results, check to see if any of the files contain any of the relevant paths. If at least one matches, then do whatever tests you need to do in the next steps. If none match, then this is where you can communicate “done” with an exit 0 since no further processing needs to happen.

that sounds to me like one of the initial workflow steps can decide whether to exit 0 or allow subsequent steps to run

manzoorwanijk commented 3 years ago

If a step exits with 0, it means that step was a success, not the whole workflow. Subsequent steps will continue to execute in that case.