Awesome-CloudOps-Automation
Awesome-CloudOps-Automation copied to clipboard
Create a Github Workflow that runs pylint for changed python files
Is your feature request related to a problem? Please describe. The Github Workflow that currently is checked in runs pylint on all python file. This can be improved to run the pylint on changed files only, this would reduce the Github workflow run minutes.
What is to be done?
- Enhance the existing workflow so it runs pylint on changed
py
files - Make this as the pre-check which should pass to open a Pull Request
Would pylint run within a docker container or just a script for running pylint is requirement here?
Hello @jstjyoti
Thank you for your interest helping our project.
I have updated the Ticket with More information and modified the Title to reflect what is expected of this ticket.
The Current workflow that is there in .github/workflow folder, does pylint on all the python files. The intention of this ticket was to run the python File on the Changed py files only.
This Gist implements one such approach. The Linter should be run.
- As a pre-check for a Pull Request.
- If the pre-check fails, the pull-request should not be open
Please do let me know if you have any questions.