Skip to content

Refactor pull request template and add checklist #8

Refactor pull request template and add checklist

Refactor pull request template and add checklist #8

Workflow file for this run

name: Lint Code Check
on:
push:
branches:
- main
- '**' # Run on pushes to all branches
pull_request:
branches:
- main
jobs:
lint:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pylint
- name: Run pylint
id: pylint
run: |
pylint --rcfile=.pylintrc $(git ls-files '*.py') > pylint_output.txt || true
score=$(tail -n 2 pylint_output.txt | head -n 1 | grep -oP '\d+\.\d+')
echo "Pylint score: $score"
if (( $(echo "$score < 8" | bc -l) )); then
echo "Pylint score is less than 8. Failing the job."
exit 1
fi