4
4
push :
5
5
branches :
6
6
- ' **' # matches every branch
7
+ tags-ignore : [ "**" ]
7
8
8
9
concurrency :
9
10
group : " ${{ github.workflow }}-${{ github.ref }}-lint"
@@ -16,7 +17,8 @@ defaults:
16
17
permissions :
17
18
id-token : write
18
19
attestations : write
19
-
20
+ contents : read
21
+ pull-requests : read
20
22
21
23
jobs :
22
24
changes :
@@ -27,42 +29,58 @@ jobs:
27
29
shell : bash
28
30
outputs :
29
31
lint : ${{steps.changes.outputs.lint }}
32
+ mypy : ${{steps.changes.outputs.mypy }}
33
+ package : ${{steps.changes.outputs.package }}
30
34
steps :
31
35
- name : Checkout code
32
- uses : actions/checkout@v4.1.7
36
+ uses : actions/checkout@v4
33
37
- id : changes
34
38
name : Check for file changes
35
- uses : dorny/paths-filter@0bc4621a3135347011ad047f9ecf449bf72ce2bd # v3.0.0
39
+ uses : dorny/paths-filter@v3 # v3.0.0
36
40
with :
37
41
base : ${{ github.ref }}
38
42
token : ${{ github.token }}
39
43
filters : .github/file-filters.yml
40
44
41
45
lint :
46
+ needs : changes
42
47
runs-on : ubuntu-latest
43
- defaults :
44
- run :
45
- shell : bash
46
- needs : [ changes ]
47
48
if : needs.changes.outputs.lint
48
49
steps :
49
- - name : Checkout code
50
-
51
-
52
- - name : Set up Python
53
- uses : actions/setup-python@v5
50
+ - uses : actions/checkout@v4
51
+ - uses : actions/setup-python@v5
54
52
with :
55
- python-version : 3.12
56
- architecture : ' x64'
57
- - uses : yezz123/setup-uv@v4
58
-
59
- - name : Install deps
60
- run : uv sync --all-groups
53
+ python-version : ' 3.13'
54
+ - run : pip install tox
55
+ - name : Static Code checks
56
+ run : tox -e lint
61
57
62
- - name : lint
63
- if : needs.changes.outputs.lint
64
- run : uv run tox -e lint
58
+ package :
59
+ needs : changes
60
+ if : needs.changes.outputs.package
61
+ runs-on : ubuntu-latest
62
+ steps :
63
+ - uses : actions/checkout@v4
64
+ - uses : actions/setup-python@v5
65
+ with :
66
+ python-version : ' 3.13'
67
+ - run : pip install tox
68
+ - name : Check Python Package structure
69
+ run : tox -e pkg_meta
65
70
66
- - name : pkg_meta
67
- if : needs.changes.outputs.lint
68
- run : uv run tox -e pkg_meta
71
+ mypy :
72
+ needs : changes
73
+ if : needs.changes.outputs.mypy
74
+ runs-on : ubuntu-latest
75
+ strategy :
76
+ fail-fast : false
77
+ matrix :
78
+ django : [ "52", "42", "32" ]
79
+ steps :
80
+ - uses : actions/checkout@v4
81
+ - uses : actions/setup-python@v5
82
+ with :
83
+ python-version : ' 3.13'
84
+ - run : pip install tox
85
+ - name : Type Checking
86
+ run : tox -e d${{ matrix.django }}-type
0 commit comments