Checking code quality with Pylint when src folder changes #19
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: Pylint Code Quality Check | |
run-name: Checking code quality with Pylint when src folder changes | |
on: | |
push: | |
paths: | |
- 'src/**' | |
jobs: | |
pylint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install pylint | |
if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi | |
- name: Run Pylint | |
run: | | |
pylint src/ --output-format=json > pylint_report.json || true | |
- name: Upload Pylint Report | |
uses: actions/upload-artifact@v3 | |
with: | |
name: pylint-report | |
path: pylint_report.json |