Skip to content

Enhancements to the infinite-ISP Pipeline #4

Enhancements to the infinite-ISP Pipeline

Enhancements to the infinite-ISP Pipeline #4

name: Linting on Pull Request
on:
pull_request:
types: [opened,synchronize]
jobs:
lintonPR:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install Dependencies
run: |
pip install pylint
- name: Fetch Main
run: |
git fetch origin main
git diff --name-only origin/main..HEAD
- name: Run pylint on modified files
run: |
changed_files=$(git diff --name-only origin/main..HEAD | grep ".py$")
if [ "$changed_files" ]; then
echo "Running pylint on changed files:"
echo "$changed_files"
echo "$changed_files" | xargs pylint
else
echo "No Python files have been changed."
fi