Format Python code with psf/black push #1562
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 | |
on: | |
push: | |
branches: | |
- master | |
workflow_call: | |
pull_request: | |
branches: | |
- "**" | |
concurrency: | |
group: pylint-${{ github.event_name == 'pull_request' && format('{0}-{1}', github.workflow, github.event.pull_request.number) || github.workflow_ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
name: PyLint | |
strategy: | |
max-parallel: 12 | |
matrix: | |
os: [macos-12, macos-13, ubuntu-20.04, ubuntu-22.04, ubuntu-24.04] | |
python-version: ["3.10", "3.11", "3.12"] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
allow-prereleases: true | |
cache: 'pip' | |
- name: Install dependencies | |
if: ${{ matrix.os == 'macos-14' || matrix.os == 'macos-12' || matrix.os == 'macos-13' }} | |
run: | | |
python -m pip install --upgrade pip | |
pip install git+https://github.com/pylint-dev/pylint.git | |
pip install git+https://github.com/pylint-dev/pylint-django.git | |
pip install -r requirements.txt | |
- name: Install dependencies on Windows | |
if: ${{ matrix.os == 'windows-2019' || matrix.os == 'windows-2022' }} | |
run: | | |
python -m pip install --upgrade pip | |
pip install git+https://github.com/pylint-dev/pylint.git | |
pip install git+https://github.com/pylint-dev/pylint-django.git | |
pip install -r requirements.txt | |
- name: Install dependencies on Ubuntu | |
if: ${{ matrix.os == 'ubuntu-20.04' || matrix.os == 'ubuntu-22.04' || matrix.os == 'ubuntu-24.04' }} | |
run: | | |
python -m pip install --upgrade pip | |
pip install git+https://github.com/pylint-dev/pylint.git | |
pip install git+https://github.com/pylint-dev/pylint-django.git | |
pip install -r requirements.txt | |
- name: Analysing the code with pylint | |
run: pylint --load-plugins pylint_django --django-settings-module=lab.settings "**/*.py" |