GilesStrong / tomopt

TomOpt: Differential Muon Tomography Optimisation
GNU Affero General Public License v3.0
4 stars 0 forks source link

Can pytest skip ("immediately pass") PRs where only markdown files were changed? #174

Closed vischia closed 1 year ago

vischia commented 1 year ago

Hi,

the use case is e.g. if one changes just the README.md or AUTHORS.md: the other three tests pass very quickly (17 seconds each), the pytest takes a longtime: is there a way of adding to the top of it something like "if the PR changes only markdown files, then this should consider automatically passed the test, skipping all the other subtests"?

GilesStrong commented 1 year ago

Potentially, but I think it would require a script to see which files changed between the branch and main; the CI probably doesn't have this flexibility. The script might be difficult properly test, too, and lead to problems going unnoticed. I'd prefer tests run every time for now.