nedbat / coveragepy

The code coverage tool for Python
https://coverage.readthedocs.io
Apache License 2.0
3.03k stars 435 forks source link

Limit test suite Workflow to only run on changes to Python files #1884

Open shenanigansd opened 1 month ago

shenanigansd commented 1 month ago

Add a filter to testsuite.yml to only run when .py files are changed.

This should cleanly coexist with the existing branch filter:

If you define both branches/branches-ignore and paths/paths-ignore, the workflow will only run when both filters are satisfied. - https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#onpushpull_requestpull_request_targetpathspaths-ignore

ref: https://discord.com/channels/267624335836053506/1253355750684753950/1298279250830557236

shenanigansd commented 1 month ago

Hmm, tests are a required check. Since we skipped them, that check will never pass. This is awkward.

nedbat commented 1 month ago

The tests are skipped if the branch is named *notests*, can we use the same mechanism?