@@ -19,47 +19,57 @@ jobs:
1919 steps :
2020 - name : β€΅οΈ Check out code from GitHub
2121 uses : actions/checkout@v6.0.2
22- - name : π Set up Poetry
23- run : pipx install poetry
2422 - name : π Set up Python ${{ env.DEFAULT_PYTHON }}
2523 id : python
2624 uses : actions/setup-python@v6.2.0
2725 with :
2826 python-version : ${{ env.DEFAULT_PYTHON }}
29- cache : " poetry"
30- - name : π Install workflow dependencies
27+ - name : π¦ Cache uv
28+ uses : actions/cache@v5
29+ with :
30+ path : |
31+ ~/.cache/uv
32+ key : ${{ runner.os }}-uv-${{ hashFiles('uv.lock') }}
33+ restore-keys : |
34+ ${{ runner.os }}-uv-
35+ - name : π Install uv
3136 run : |
32- poetry config virtualenvs.create true
33- poetry config virtualenvs.in-project true
37+ curl -LsSf https://astral.sh/uv/install.sh | sh
38+ echo "$HOME/.local/bin" >> $GITHUB_PATH
3439 - name : π Install Python dependencies
35- run : poetry install --no-interaction
40+ run : uv sync --all-groups
3641 - name : π Check code for common misspellings
37- run : poetry run prek run codespell --all-files
42+ run : uv run prek run codespell --all-files
3843
3944 ruff :
4045 name : Ruff
4146 runs-on : ubuntu-latest
4247 steps :
4348 - name : β€΅οΈ Check out code from GitHub
4449 uses : actions/checkout@v6.0.2
45- - name : π Set up Poetry
46- run : pipx install poetry
4750 - name : π Set up Python ${{ env.DEFAULT_PYTHON }}
4851 id : python
4952 uses : actions/setup-python@v6.2.0
5053 with :
5154 python-version : ${{ env.DEFAULT_PYTHON }}
52- cache : " poetry"
53- - name : π Install workflow dependencies
55+ - name : π¦ Cache uv
56+ uses : actions/cache@v5
57+ with :
58+ path : |
59+ ~/.cache/uv
60+ key : ${{ runner.os }}-uv-${{ hashFiles('uv.lock') }}
61+ restore-keys : |
62+ ${{ runner.os }}-uv-
63+ - name : π Install uv
5464 run : |
55- poetry config virtualenvs.create true
56- poetry config virtualenvs.in-project true
65+ curl -LsSf https://astral.sh/uv/install.sh | sh
66+ echo "$HOME/.local/bin" >> $GITHUB_PATH
5767 - name : π Install Python dependencies
58- run : poetry install --no-interaction
68+ run : uv sync --all-groups
5969 - name : π Run ruff linter
60- run : poetry run ruff check --output-format=github .
70+ run : uv run ruff check --output-format=github .
6171 - name : π Run ruff formatter
62- run : poetry run ruff format --check .
72+ run : uv run ruff format --check .
6373
6474 prek-builtin-hooks :
6575 name : prek-builtin-hooks
@@ -98,91 +108,111 @@ jobs:
98108 steps :
99109 - name : β€΅οΈ Check out code from GitHub
100110 uses : actions/checkout@v6.0.2
101- - name : π Set up Poetry
102- run : pipx install poetry
103111 - name : π Set up Python ${{ env.DEFAULT_PYTHON }}
104112 id : python
105113 uses : actions/setup-python@v6.2.0
106114 with :
107115 python-version : ${{ env.DEFAULT_PYTHON }}
108- cache : " poetry"
109- - name : π Install workflow dependencies
116+ - name : π¦ Cache uv
117+ uses : actions/cache@v5
118+ with :
119+ path : |
120+ ~/.cache/uv
121+ key : ${{ runner.os }}-uv-${{ hashFiles('uv.lock') }}
122+ restore-keys : |
123+ ${{ runner.os }}-uv-
124+ - name : π Install uv
110125 run : |
111- poetry config virtualenvs.create true
112- poetry config virtualenvs.in-project true
126+ curl -LsSf https://astral.sh/uv/install.sh | sh
127+ echo "$HOME/.local/bin" >> $GITHUB_PATH
113128 - name : π Install Python dependencies
114- run : poetry install --no-interaction
129+ run : uv sync --all-groups
115130 - name : π Check Python AST
116- run : poetry run prek run check-ast --all-files
131+ run : uv run prek run check-ast --all-files
117132 - name : π Check docstring is first
118- run : poetry run prek run check-docstring-first --all-files
133+ run : uv run prek run check-docstring-first --all-files
119134
120135 pylint :
121136 name : pylint
122137 runs-on : ubuntu-latest
123138 steps :
124139 - name : β€΅οΈ Check out code from GitHub
125140 uses : actions/checkout@v6.0.2
126- - name : π Set up Poetry
127- run : pipx install poetry
128141 - name : π Set up Python ${{ env.DEFAULT_PYTHON }}
129142 id : python
130143 uses : actions/setup-python@v6.2.0
131144 with :
132145 python-version : ${{ env.DEFAULT_PYTHON }}
133- cache : " poetry"
134- - name : π Install workflow dependencies
146+ - name : π¦ Cache uv
147+ uses : actions/cache@v5
148+ with :
149+ path : |
150+ ~/.cache/uv
151+ key : ${{ runner.os }}-uv-${{ hashFiles('uv.lock') }}
152+ restore-keys : |
153+ ${{ runner.os }}-uv-
154+ - name : π Install uv
135155 run : |
136- poetry config virtualenvs.create true
137- poetry config virtualenvs.in-project true
156+ curl -LsSf https://astral.sh/uv/install.sh | sh
157+ echo "$HOME/.local/bin" >> $GITHUB_PATH
138158 - name : π Install Python dependencies
139- run : poetry install --no-interaction
159+ run : uv sync --all-groups
140160 - name : π Run pylint
141- run : poetry run prek run pylint --all-files
161+ run : uv run prek run pylint --all-files
142162
143163 yamllint :
144164 name : yamllint
145165 runs-on : ubuntu-latest
146166 steps :
147167 - name : β€΅οΈ Check out code from GitHub
148168 uses : actions/checkout@v6.0.2
149- - name : π Set up Poetry
150- run : pipx install poetry
151169 - name : π Set up Python ${{ env.DEFAULT_PYTHON }}
152170 id : python
153171 uses : actions/setup-python@v6.2.0
154172 with :
155173 python-version : ${{ env.DEFAULT_PYTHON }}
156- cache : " poetry"
157- - name : π Install workflow dependencies
174+ - name : π¦ Cache uv
175+ uses : actions/cache@v5
176+ with :
177+ path : |
178+ ~/.cache/uv
179+ key : ${{ runner.os }}-uv-${{ hashFiles('uv.lock') }}
180+ restore-keys : |
181+ ${{ runner.os }}-uv-
182+ - name : π Install uv
158183 run : |
159- poetry config virtualenvs.create true
160- poetry config virtualenvs.in-project true
184+ curl -LsSf https://astral.sh/uv/install.sh | sh
185+ echo "$HOME/.local/bin" >> $GITHUB_PATH
161186 - name : π Install Python dependencies
162- run : poetry install --no-interaction
187+ run : uv sync --all-groups
163188 - name : π Run yamllint
164- run : poetry run yamllint .
189+ run : uv run yamllint .
165190
166191 prettier :
167192 name : Prettier
168193 runs-on : ubuntu-latest
169194 steps :
170195 - name : β€΅οΈ Check out code from GitHub
171196 uses : actions/checkout@v6.0.2
172- - name : π Set up Poetry
173- run : pipx install poetry
174197 - name : π Set up Python ${{ env.DEFAULT_PYTHON }}
175198 id : python
176199 uses : actions/setup-python@v6.2.0
177200 with :
178201 python-version : ${{ env.DEFAULT_PYTHON }}
179- cache : " poetry"
180- - name : π Install workflow dependencies
202+ - name : π¦ Cache uv
203+ uses : actions/cache@v5
204+ with :
205+ path : |
206+ ~/.cache/uv
207+ key : ${{ runner.os }}-uv-${{ hashFiles('uv.lock') }}
208+ restore-keys : |
209+ ${{ runner.os }}-uv-
210+ - name : π Install uv
181211 run : |
182- poetry config virtualenvs.create true
183- poetry config virtualenvs.in-project true
212+ curl -LsSf https://astral.sh/uv/install.sh | sh
213+ echo "$HOME/.local/bin" >> $GITHUB_PATH
184214 - name : π Install Python dependencies
185- run : poetry install --no-interaction
215+ run : uv sync --all-groups
186216 - name : π Set up Node.js
187217 uses : actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
188218 with :
@@ -191,4 +221,4 @@ jobs:
191221 - name : π Install NPM dependencies
192222 run : npm install
193223 - name : π Run prettier
194- run : poetry run prek run prettier --all-files
224+ run : uv run prek run prettier --all-files
0 commit comments