-
Notifications
You must be signed in to change notification settings - Fork 1
91 lines (84 loc) · 2.35 KB
/
ci.yaml
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
name: CI
on:
push:
branches:
- main
pull_request:
schedule:
- cron: '33 16 * * 3' # https://crontab.guru/#33_16_*_*_3
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
lint:
name: Lint
uses: less-action/reusables/.github/workflows/pre-commit.yaml@v10
with:
python-version: "3.10"
check-build:
name: Check packaging
uses: less-action/reusables/.github/workflows/python-test-build.yaml@v10
test:
runs-on: ubuntu-latest
strategy:
matrix:
include:
# 3.12
- python-version: "3.12"
tox_env: "django42-py312"
# 3.11
- python-version: "3.11"
tox_env: "django41-py311"
- python-version: "3.11"
tox_env: "django40-py311"
# 3.10
- python-version: "3.10"
tox_env: "django_main"
- python-version: "3.10"
tox_env: "django41-py310"
- python-version: "3.10"
tox_env: "django40-py310"
- python-version: "3.10"
tox_env: "django32-py310"
# 3.9
- python-version: "3.9"
tox_env: "django41-py39"
- python-version: "3.9"
tox_env: "django40-py39"
- python-version: "3.9"
tox_env: "django32-py39"
name: Test ${{ matrix.tox_env }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- run: pip install tox
- name: Run tests
run: tox -e ${{ matrix.tox_env }}
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml
fail_ci_if_error: true
name: codecov-py${{ matrix.python-version }}
static-typing:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.9'
- run: pip install tox
- name: Run mypy
run: tox -e mypy
check-migrations:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.9'
- run: pip install tox
- name: Check migrations
run: tox -e check-migrations