Skip to content

Commit

Permalink
Update and rename pylint.yml to pre_commit.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
ruwayd99 authored Dec 7, 2023
1 parent 35a0d3e commit 5c3b9f0
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 23 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/pre_commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Pylint Pre-Commit

on: [pull_request]

jobs:
pre-commit:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10"]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Get changed files
id: changed-files
uses: tj-actions/[email protected]
- name: Check for errors using pylint (pre-commit)
run: |
for file in ${{ steps.changed-files.outputs.all_modified_files }}; do
if [[ -f $file && $file == *.py ]]; then
echo $file
pylint --errors-only --disable=all $file
fi
done
23 changes: 0 additions & 23 deletions .github/workflows/pylint.yml

This file was deleted.

0 comments on commit 5c3b9f0

Please sign in to comment.