fix: refactor Python lint workflow to dynamically determine target projects and streamline directory handling #24
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This pull request includes significant updates to the GitHub Actions workflow for Python linting and testing. The changes aim to improve the flexibility and efficiency of the workflow by introducing a new job to dynamically determine the target projects based on the changes in the pull request.
Key updates to the GitHub Actions workflow:
.github/workflows/python-lint-test.yml
: Replaced thetarget_dir
input withtarget_projects
to specify the projects to run lint and test on..github/workflows/python-lint-test.yml
: Added a new jobtarget_projects
to find the target projects by checking for changes in directories containingpyproject.toml
andMakefile
..github/workflows/python-lint-test.yml
: Updated the mainpython-lint-and-test
job to depend on thetarget_projects
job and use a matrix strategy to run lint and test on each project found..github/workflows/python-lint-test.yml
: Removed the old logic for determining changed directories and replaced it with a step to print the changed directories based on the output of thetarget_projects
job..github/workflows/python-lint-test.yml
: Simplified the steps for installing dependencies, linting, and testing by removing unnecessary condition checks and using the matrix strategy.