anapaulagomes / pytest-picked

Run the tests related to the changed files (according to Git) 🤓
MIT License
368 stars 16 forks source link

Add a new mode "File" #150

Open goal1860 opened 1 year ago

goal1860 commented 1 year ago

There are certain scenarios that git is not available at the time of execution, so I guess it will be beneficial to have a new "File" mode, which means it reads change set from a text file instead of git diff. For example, in my infra setup, tests are built into Docker images and deployed to K8s for execution. .git fold is dropped during image building. Even the .git folder is retained the K8s pod does not have permission to access git. My current workaround is to run git diff at the time of image building and save the result to a text file in the image. If the plugin has the capability to read changes from that text file then I can directly use this plugin. Currently I have to write my own plugin.