@@ -12,31 +12,60 @@ jobs:
12
12
lint :
13
13
runs-on : ubuntu-latest
14
14
steps :
15
- - uses : actions/checkout@v2
16
- - uses : actions/setup-python@v2
15
+ - uses : actions/checkout@v4
16
+ - uses : actions/setup-python@v5
17
17
with :
18
- python-version : ' 3.9 '
18
+ python-version : ' 3.13 '
19
19
20
- - name : Install Poetry
21
- uses : snok/install-poetry@v1.4.1
20
+ - name : Install UV
21
+ uses : astral-sh/setup-uv@v3
22
22
with :
23
- virtualenvs-create : false
24
- version : 1.1.15
23
+ enable-cache : true
24
+ cache-suffix : " ${{ matrix.os }}-${{ matrix.python-version }}"
25
+ cache-dependency-glob : " **/pyproject.toml"
25
26
26
- - name : Load cached wheels
27
- id : cached-pip-wheels
28
- uses : actions/cache@v2
27
+ - name : Install dependencies
28
+ run : uv sync --extra typing
29
+
30
+ - name : check
31
+ run : uv run ruff check parametrize
32
+
33
+ - name : format
34
+ run : uv run ruff format parametrize
35
+
36
+
37
+ type-check :
38
+ needs : lint
39
+ strategy :
40
+ fail-fast : false
41
+ matrix :
42
+ os : ["ubuntu-latest", "macos-latest", "windows-latest"]
43
+ python-version : ["3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
44
+ defaults :
45
+ run :
46
+ shell : bash # required for windows
47
+ runs-on : ${{ matrix.os }}
48
+ steps :
49
+ - name : Check out repository
50
+ uses : actions/checkout@v4
51
+
52
+ - name : Setup Python ${{ matrix.python-version }}
53
+ uses : actions/setup-python@v5
29
54
with :
30
- path : |
31
- ~/cache
32
- poetry.lock
33
- key : venv-${{ runner.os }}-${{ hashFiles('**/pyproject.toml') }}
55
+ python-version : ${{ matrix.python-version }}
56
+
57
+ - name : Install UV
58
+ uses : astral-sh/setup-uv@v3
59
+ with :
60
+ enable-cache : true
61
+ cache-suffix : " ${{ matrix.os }}-${{ matrix.python-version }}"
62
+ cache-dependency-glob : " **/pyproject.toml"
34
63
35
64
- name : Install dependencies
36
- run : poetry install --no-interaction --no-root
65
+ run : uv sync --extra typing
37
66
38
- - name : flake8
39
- run : flake8 parametrize tests
67
+ - name : Run MyPy
68
+ run : uv run mypy parametrize
40
69
41
70
test :
42
71
needs : lint
@@ -51,65 +80,46 @@ jobs:
51
80
runs-on : ${{ matrix.os }}
52
81
steps :
53
82
- name : Check out repository
54
- uses : actions/checkout@v2
83
+ uses : actions/checkout@v4
55
84
56
85
- name : Set up python ${{ matrix.python-version }}
57
- uses : actions/setup-python@v2
86
+ uses : actions/setup-python@v5
58
87
with :
59
88
python-version : ${{ matrix.python-version }}
60
89
61
- - name : Install Poetry
62
- uses : snok/install-poetry@v1.4.1
63
- with :
64
- virtualenvs-create : false
65
- version : 1.1.15
66
-
67
- - name : Load cached wheels
68
- id : cached-pip-wheels
69
- uses : actions/cache@v2
90
+ - name : Install uv
91
+ uses : astral-sh/setup-uv@v3
70
92
with :
71
- path : |
72
- ~/cache
73
- poetry.lock
74
- key : venv-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('**/pyproject.toml') }}
93
+ enable-cache : true
94
+ cache-suffix : " ${{ matrix.os }}-${{ matrix.python-version }}"
95
+ cache-dependency-glob : " **/pyproject.toml"
75
96
76
97
- name : Install dependencies
77
- run : poetry install --no-interaction --no-root
78
-
79
- - name : Run mypy
80
- run : mypy parametrize
98
+ run : uv sync --extra test
81
99
82
100
- name : Run tests
83
101
run : pytest tests --cov=parametrize
84
102
85
-
86
103
deploy :
87
104
needs : test
88
105
if : " success() && startsWith(github.ref, 'refs/tags/')"
89
106
runs-on : ubuntu-latest
90
107
steps :
91
- - uses : actions/checkout@v2
92
- - uses : actions/setup-python@v2
108
+ - uses : actions/checkout@v4
109
+ - uses : actions/setup-python@v5
93
110
with :
94
- python-version : ' 3.9 '
111
+ python-version : ' 3.13 '
95
112
96
- - name : Install Poetry
97
- uses : snok/install-poetry@v1.4.1
98
- with :
99
- virtualenvs-create : false
100
- version : 1.1.15
101
-
102
- - name : Install poetry-dynamic-versioning
103
- run : python -m pip install poetry-dynamic-versioning
104
-
105
- - name : Bump version
106
- run : poetry-dynamic-versioning
113
+ - name : Build
114
+ run : uv build
107
115
108
116
- name : Generate Changelog
109
117
run : python tools/get_changes.py ${{ github.ref }} > changelog.txt
110
118
111
- - name : Upload to pypi
112
- run : poetry publish --build --username __token__ --password ${{ secrets.PYPI_TOKEN }}
119
+ - name : Upload to PyPI
120
+ env :
121
+ UV_PUBLISH_TOKEN : ${{ secrets.PYPI_TOKEN }}
122
+ run : uv publish
113
123
114
124
- name : Release
115
125
uses : softprops/action-gh-release@v1
0 commit comments