Skip to content

Pylint code check

Pylint code check #348

Workflow file for this run

name: Pylint code check
on:
workflow_run:
workflows: ["Reformat code"]
branches: [main]
types:
- completed
jobs:
lint:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11"]
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
pip install --requirement requirements.txt
pip install pylint
- name: Create log files
run: |
mkdir lint-logs
touch lint-logs/pylint.txt
echo LOGFILE_NAME="logs-$(python3 -V | cut -c 8-)" >> $GITHUB_ENV
- name: Analysing the code with pylint
run: |
pylint $(git ls-files '*.py') --rcfile=pylintrc > lint-logs/pylint.txt
cat lint-logs/pylint.txt
- uses: actions/upload-artifact@v4
with:
name: ${{env.LOGFILE_NAME}}
path: lint-logs/
- name: Remove log files
run: |
rm -r lint-logs