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

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

Open
tn3rb opened this issue Feb 2, 2021 · 5 comments
Open

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

tn3rb opened this issue Feb 2, 2021 · 5 comments
Assignees

Comments

@tn3rb
Copy link
Member

tn3rb commented Feb 2, 2021

If a PR only contains CSS changes (ex: eventespresso/event-espresso-core#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:

  • returning 'true' from PHP unit tests
  • skip PHP tests
@manzoorwanijk
Copy link
Contributor

There is currently no easy workaround for that:
https://github.521000.bestmunity/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.521000.bestmunity/t/exit-on-success/132524

@tn3rb tn3rb changed the title Allow Tests to Pass if PR is CSS Changes Only Allow Tests to Pass if PR has CSS Changes Only Feb 4, 2021
@tn3rb
Copy link
Member Author

tn3rb commented Feb 4, 2021

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

@manzoorwanijk
Copy link
Contributor

No, you cannot exit early with 0

@tn3rb
Copy link
Member Author

tn3rb commented Feb 4, 2021

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
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants