Skip to content

Commit 21c23a2

Browse files
authored
updates CI (#28)
updates CI
1 parent a31bdff commit 21c23a2

File tree

5 files changed

+50
-25
lines changed

5 files changed

+50
-25
lines changed

.github/file-filters.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ python: &python
88
- added|modified: 'tests/**'
99
- 'manage.py'
1010

11+
package:
12+
- *python
13+
- *dependencies
14+
1115
changelog:
1216
- added|modified: 'changes/**'
1317
- 'CHANGELOG.md'

.github/workflows/lint.yml

Lines changed: 42 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
branches:
66
- '**' # matches every branch
7+
tags-ignore: [ "**" ]
78

89
concurrency:
910
group: "${{ github.workflow }}-${{ github.ref }}-lint"
@@ -16,7 +17,8 @@ defaults:
1617
permissions:
1718
id-token: write
1819
attestations: write
19-
20+
contents: read
21+
pull-requests: read
2022

2123
jobs:
2224
changes:
@@ -27,42 +29,58 @@ jobs:
2729
shell: bash
2830
outputs:
2931
lint: ${{steps.changes.outputs.lint }}
32+
mypy: ${{steps.changes.outputs.mypy }}
33+
package: ${{steps.changes.outputs.package }}
3034
steps:
3135
- name: Checkout code
32-
uses: actions/checkout@v4.1.7
36+
uses: actions/checkout@v4
3337
- id: changes
3438
name: Check for file changes
35-
uses: dorny/paths-filter@0bc4621a3135347011ad047f9ecf449bf72ce2bd # v3.0.0
39+
uses: dorny/paths-filter@v3 # v3.0.0
3640
with:
3741
base: ${{ github.ref }}
3842
token: ${{ github.token }}
3943
filters: .github/file-filters.yml
4044

4145
lint:
46+
needs: changes
4247
runs-on: ubuntu-latest
43-
defaults:
44-
run:
45-
shell: bash
46-
needs: [ changes ]
4748
if: needs.changes.outputs.lint
4849
steps:
49-
- name: Checkout code
50-
uses: actions/[email protected]
51-
52-
- name: Set up Python
53-
uses: actions/setup-python@v5
50+
- uses: actions/checkout@v4
51+
- uses: actions/setup-python@v5
5452
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
6157

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
6570

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

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
~*
33
/build
44
!tests/.coveragerc
5+
6+
!.git
57
!.gitignore
68
!.github
79
!.isort.cfg

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,3 +101,4 @@ max_supported_python = "3.13"
101101

102102
[tool.uv]
103103
package = true
104+
required-version = ">=0.7.2"

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ env_list =
99
d{52, 42, 32}-type
1010
pkg_meta
1111
d{42, 32}-py{39}
12-
d{52}-py{310}
12+
d{52}-py{313}
1313
skip_missing_interpreters = true
1414

1515
[testenv]

0 commit comments

Comments
 (0)