forked from django-commons/django-unicorn
-
Notifications
You must be signed in to change notification settings - Fork 0
77 lines (61 loc) · 1.69 KB
/
python.yml
File metadata and controls
77 lines (61 loc) · 1.69 KB
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
name: Python
on:
push:
workflow_dispatch:
env:
LINT_PYTHON_VERSION: 3.11
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
cache-dependency-glob: "uv.lock"
- name: Set up Python ${{ env.LINT_PYTHON_VERSION }}
uses: actions/setup-python@v5
with:
python-version: ${{ env.LINT_PYTHON_VERSION }}
- name: Install dependencies
run: |
uv sync --dev
- name: ruff check
run: uv run ruff check .
# - name: mypy check
# run: uv run mypy django_unicorn
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
django-version: ["5.2", "6.0"]
exclude:
- python-version: "3.10"
django-version: "6.0"
- python-version: "3.11"
django-version: "6.0"
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
cache-dependency-glob: "uv.lock"
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
uv sync --all-extras --dev
uv pip install django==${{ matrix.django-version }}
- name: Fast tests
run: uv run pytest -m 'not slow and not playwright'
- name: Slow tests
run: uv run pytest -m 'slow'