Checking code quality with Flake8 when src folder changes #16
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: Flake8 Code Quality Check | |
run-name: Checking code quality with Flake8 when src folder changes | |
on: | |
push: | |
paths: | |
- 'src/**' | |
jobs: | |
flake8: | |
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 flake8 | |
if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi | |
- name: Run Flake8 | |
run: | | |
flake8 src/ --output-format=json > pylint_report.json || true | |
- name: Upload Flake8 Report | |
uses: actions/upload-artifact@v3 | |
with: | |
name: flake8-report | |
path: flake8_report.json |