@@ -2,80 +2,60 @@ name: CI/CD
22
33on : # yamllint disable-line rule:truthy
44 pull_request :
5- branches :
6- - main
5+ branches : ["master", "main"]
76 push :
8- branches :
9- - main
7+ branches : ["master", "main"]
108 release :
11- types :
12- - published
9+ types : [published]
1310
1411jobs :
1512 lint :
1613 runs-on : ubuntu-latest
1714 steps :
1815 - uses : actions/checkout@v4
1916
20- - name : Set up Python
21- uses : actions /setup-python@v5
17+ - name : Install uv
18+ uses : astral-sh /setup-uv@v4
2219 with :
23- python-version : " 3.11 "
20+ enable-cache : true
2421
25- - name : Install Poetry
26- uses : snok/install-poetry@v1
27- with :
28- version : 1.5.1
29- virtualenvs-create : true
30- virtualenvs-in-project : true
31- installer-parallel : true
22+ - name : Set up Python
23+ run : uv python install 3.13
3224
3325 - name : Install dependencies
34- run : |
35- python -m pip install --upgrade pip
36- pip install tox
26+ run : uv sync --all-extras
3727
38- - name : Black with tox
39- run : tox -e black
40-
41- - name : Isort with tox
42- run : tox -e isort
28+ - name : Ruff with tox
29+ run : uv run tox -e ruff
4330
4431 - name : Pylint with tox
45- run : tox -e pylint
32+ run : uv run tox -e pylint
4633
4734 test :
4835 runs-on : ubuntu-latest
4936 strategy :
5037 matrix :
51- python-version : ["3.10 ", "3.11 "]
52- dj-version : [django42, django50 ]
38+ python-version : ["3.12 ", "3.13 "]
39+ dj-version : [django52, django60 ]
5340
5441 steps :
5542 - uses : actions/checkout@v4
5643
57- - name : Set up Python ${{ matrix.python-version }}
58- uses : actions /setup-python@v5
44+ - name : Install uv
45+ uses : astral-sh /setup-uv@v4
5946 with :
60- python-version : ${{ matrix.python-version }}
47+ enable-cache : true
6148
62- - name : Install Poetry
63- uses : snok/install-poetry@v1
64- with :
65- version : 1.5.1
66- virtualenvs-create : true
67- virtualenvs-in-project : true
68- installer-parallel : true
49+ - name : Set up Python ${{ matrix.python-version }}
50+ run : uv python install ${{ matrix.python-version }}
6951
7052 - name : Install dependencies
71- run : |
72- python -m pip install --upgrade pip
73- pip install tox
53+ run : uv sync --all-extras
7454
7555 - name : Test with tox
7656 run : |
7757 PY_VERSION=${{ matrix.python-version }} &&
78- tox -e py${PY_VERSION//.}-${{ matrix.dj-version }}
58+ uv run tox -e py${PY_VERSION//.}-${{ matrix.dj-version }}
7959
8060 release :
8161 name : Release
@@ -93,34 +73,27 @@ jobs:
9373 steps :
9474 - uses : actions/checkout@v4
9575
96- - name : Set up Python
97- uses : actions /setup-python@v5
76+ - name : Install uv
77+ uses : astral-sh /setup-uv@v4
9878 with :
99- python-version : " 3.11"
79+ enable-cache : true
80+
81+ - name : Set up Python
82+ run : uv python install 3.13
10083
10184 - name : Set up Node
10285 uses : actions/setup-node@v4
10386 with :
104- node-version : 18
105-
106- - name : Install Poetry
107- uses : snok/install-poetry@v1
108- with :
109- version : 1.5.1
110- virtualenvs-create : true
111- virtualenvs-in-project : true
112- installer-parallel : true
87+ node-version : 22
11388
11489 - name : Install dependencies
115- run : |
116- npm ci
90+ run : npm install
11791
11892 - name : Build JS/CSS deps
119- run : |
120- npm run build
93+ run : npm run build
12194
12295 - name : Build Package
123- run : poetry build
96+ run : uv build
12497
12598 - name : Publish package distributions to PyPI
12699 uses : pypa/gh-action-pypi-publish@release/v1
0 commit comments