documentation icon indicating copy to clipboard operation
documentation copied to clipboard

Use Python script for status check path filtering in CI

Open frankharkins opened this issue 1 month ago • 0 comments

Work towards #1970

We can't use GitHub's path filtering to have status checks be required for some files but not for others. If a check is required but does not run due to path filtering, then CI can never pass (see https://github.com/orgs/community/discussions/44490#discussion-4761945).

This PR adds a workaround to the notebook test job: We use a Python script to decide if the check should run and use conditionals to skip the rest of the job if the check isn't required.

A benefit of switching to Python to do the path filtering is that we can test the filtering function locally. With the previous setup, I'd often push test commits with different files to check things were working.

While this seems like a lot of code, tests and copyright notices make up ~50% of this PR. I also hope to DRY some of this in a follow-up refactor and when I do the same thing for the API checks.

I recommend reviewing each commit separately.

frankharkins avatar Nov 26 '25 16:11 frankharkins