We have a TS monorepo with sets of tests for each or the apps run via actions on pull request.
“Require status checks to pass before merging” is checked. If it’s checked, then mandatory actions should be specified, which we did.
In each action path to the relevant app was set up, so that relevant tests would run for a relevant app only.
But if PR is made to a directory outside of what’s set up in paths, 0 checks are done and merging is blocked.
We enabled all actions on all PRs and inside the actions added conditions:
- uses: dorny/paths-filter@v2
And on the next step we decide whether to run tests or not:
if: steps.is-affected.outputs.app == ‘true’
Is it the right approach? Looks like it’s the only solution, otherwise PRs are blocked.