Bump the straightforward-dependencies group across 1 directory with 5 updates #1512
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Lint Python Files - Flake8 | |
# flake8 to check the syntax of changed files | |
# but ingore E501 error (line too long) and W503 error (line break before binary operator) | |
on: [push, pull_request] | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 # Ensure the entire history is fetched | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.10" | |
- name: Install Flake8 | |
run: pip install flake8 | |
- name: Get Changed Files | |
id: changed-files | |
uses: tj-actions/changed-files@v44 | |
with: | |
files: | | |
**.py | |
files_ignore: | | |
scripts/jobs/parking/**/*.py | |
- name: Lint Changed Python Files | |
if: steps.changed-files.outputs.any_changed == 'true' | |
run: | | |
CHANGED_FILES="${{ steps.changed-files.outputs.all_changed_files }}" | |
IFS=' ' read -r -a FILE_ARRAY <<< "$CHANGED_FILES" | |
for FILE in "${FILE_ARRAY[@]}" | |
do | |
flake8 $FILE --ignore=E501,W503 | |
done |