File: lint.yml

package info (click to toggle)
django-polymorphic 4.10.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,104 kB
  • sloc: python: 12,304; javascript: 280; makefile: 15
file content (94 lines) | stat: -rw-r--r-- 2,512 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
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