mirror of
https://github.com/django-polymorphic/django-polymorphic.git
synced 2026-01-15 04:18:41 +03:00
95 lines
2.5 KiB
YAML
95 lines
2.5 KiB
YAML
name: Lint
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
on:
|
|
push:
|
|
tags-ignore:
|
|
- '*'
|
|
branches:
|
|
- '*'
|
|
pull_request:
|
|
workflow_call:
|
|
workflow_dispatch:
|
|
inputs:
|
|
debug:
|
|
description: 'Open ssh debug session.'
|
|
required: true
|
|
default: false
|
|
type: boolean
|
|
|
|
jobs:
|
|
|
|
linting:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
# run static analysis on bleeding and trailing edges
|
|
python-version: [ '3.10', '3.12', '3.14' ]
|
|
django-version:
|
|
- '4.2' # LTS April 2026
|
|
- '5.2' # LTS April December 2027
|
|
- '6.0' #
|
|
exclude:
|
|
- python-version: '3.12'
|
|
django-version: '4.2'
|
|
- python-version: '3.14'
|
|
django-version: '4.2'
|
|
|
|
- python-version: '3.10'
|
|
django-version: '5.2'
|
|
- python-version: '3.14'
|
|
django-version: '5.2'
|
|
|
|
- python-version: '3.10'
|
|
django-version: '6.0'
|
|
- python-version: '3.12'
|
|
django-version: '6.0'
|
|
|
|
env:
|
|
TEST_PYTHON_VERSION: ${{ matrix.python-version }}
|
|
TEST_DJANGO_VERSION: ${{ matrix.django-version }}
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
with:
|
|
persist-credentials: false
|
|
- name: Set up Python ${{ matrix.python-version }}
|
|
uses: actions/setup-python@v5
|
|
id: sp
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
|
|
- name: Install uv
|
|
uses: astral-sh/setup-uv@v6
|
|
with:
|
|
enable-cache: true
|
|
- name: Install Just
|
|
uses: extractions/setup-just@v3
|
|
- name: Install Dependencies
|
|
run: |
|
|
just setup ${{ steps.sp.outputs.python-path }}
|
|
if [[ "${{ matrix.django-version }}" =~ (a|b|rc) ]]; then
|
|
just test-lock Django==${{ matrix.django-version }}
|
|
else
|
|
just test-lock Django~=${{ matrix.django-version }}.0
|
|
fi
|
|
just install-docs
|
|
- name: Install Emacs
|
|
if: ${{ github.event.inputs.debug == 'true' }}
|
|
run: |
|
|
sudo apt install emacs
|
|
- name: Setup tmate session
|
|
if: ${{ github.event.inputs.debug == 'true' }}
|
|
uses: mxschmitt/action-tmate@v3.22
|
|
with:
|
|
detached: true
|
|
timeout-minutes: 60
|
|
- name: Run Static Analysis
|
|
run: |
|
|
just check-lint
|
|
just check-format
|
|
just check-types
|
|
just check-package
|
|
just check-readme
|