mirror of
https://github.com/django/django.git
synced 2026-02-09 02:49:25 +08:00
* psf/black-pre-commit-mirror: 25.9.0 -> 25.12.0 * pre-commit/mirrors-eslint: v9.36.0 -> v9.39.1 * zizmorcore/zizmor-pre-commit: v1.16.3 -> v1.19.0 * zizmorcore/zizmor-action: 0.2.0 -> 0.3.0
86 lines
1.9 KiB
YAML
86 lines
1.9 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
|
|
timeout-minutes: 60
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v6
|
|
with:
|
|
persist-credentials: false
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v6
|
|
with:
|
|
python-version: '3.14'
|
|
- run: python -m pip install flake8
|
|
- name: flake8
|
|
# Pinned to v3.0.0.
|
|
uses: liskin/gh-problem-matcher-wrap@e7b7beaaafa52524748b31a381160759d68d61fb
|
|
with:
|
|
linters: flake8
|
|
run: flake8
|
|
|
|
isort:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 60
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v6
|
|
with:
|
|
persist-credentials: false
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v6
|
|
with:
|
|
python-version: '3.14'
|
|
- run: python -m pip install isort
|
|
- name: isort
|
|
# Pinned to v3.0.0.
|
|
uses: liskin/gh-problem-matcher-wrap@e7b7beaaafa52524748b31a381160759d68d61fb
|
|
with:
|
|
linters: isort
|
|
run: isort --check --diff django tests scripts
|
|
|
|
black:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 60
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v6
|
|
with:
|
|
persist-credentials: false
|
|
- name: black
|
|
uses: psf/black@stable
|
|
|
|
zizmor:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 60
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v6
|
|
with:
|
|
persist-credentials: false
|
|
- name: Run zizmor
|
|
uses: zizmorcore/zizmor-action@e639db99335bc9038abc0e066dfcd72e23d26fb4 # v0.3.0
|
|
with:
|
|
advanced-security: false
|
|
annotations: true
|