0
0
mirror of https://github.com/django/django.git synced 2024-12-01 15:42:04 +01:00
django/.github/workflows/linters.yml
Mariusz Felisiak 744a1af7f9
Bumped gh-problem-matcher-wrap version to 2.0.0.
This avoids issues with using deprecated Node.js 12 actions.
2022-11-22 11:59:48 +01:00

63 lines
1.4 KiB
YAML

name: Linters
on:
pull_request:
paths-ignore:
- 'docs/**'
push:
branches:
- main
paths-ignore:
- 'docs/**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
flake8:
name: flake8
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- run: python -m pip install flake8
- name: flake8
# Pinned to v2.0.0.
uses: liskin/gh-problem-matcher-wrap@d8afa2cfb66dd3f982b1950429e652bc14d0d7d2
with:
linters: flake8
run: flake8
isort:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- run: python -m pip install isort
- name: isort
# Pinned to v2.0.0.
uses: liskin/gh-problem-matcher-wrap@d8afa2cfb66dd3f982b1950429e652bc14d0d7d2
with:
linters: isort
run: isort --check --diff django tests scripts
black:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: black
uses: psf/black@stable