Skip to content

Commit 5dce59f

Browse files
committed
Update ci.yml
1 parent b453e3c commit 5dce59f

File tree

1 file changed

+11
-27
lines changed

1 file changed

+11
-27
lines changed

.github/workflows/ci.yml

Lines changed: 11 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ jobs:
1919
matrix:
2020
os: [ubuntu-latest]
2121

22-
name: context
2322
runs-on: ${{ matrix.os }}
2423
steps:
2524
- name: Dump GitHub script context
@@ -74,42 +73,27 @@ jobs:
7473
- name: Checkout
7574
uses: actions/checkout@v4
7675

77-
- name: Set up Poetry
78-
run: |
79-
pipx install poetry
80-
poetry config virtualenvs.in-project true
76+
- name: Set up UV
77+
uses: astral-sh/setup-uv@v5
8178

8279
- name: Set up Python
8380
id: setup-python
8481
uses: actions/setup-python@v5
8582
with:
8683
python-version: ${{ matrix.python }}
87-
cache: poetry
8884

8985
- name: Set up environment
9086
if: ${{ runner.os != 'Windows' }}
9187
run: |
92-
echo "POETRY_CACHE_DIR=$(poetry config cache-dir)" >> ${GITHUB_ENV}
93-
echo "$(poetry env info --path)/bin" >> ${GITHUB_PATH}
88+
echo "$(realpath .venv)/bin" >> ${GITHUB_PATH}
9489
9590
- name: Set up environment (Windows)
9691
if: ${{ runner.os == 'Windows' }}
9792
run: |
98-
"POETRY_CACHE_DIR=$(poetry config cache-dir)" | Out-File -FilePath ${env:GITHUB_ENV} -Append
99-
"$(poetry env info --path)/Scripts" | Out-File -FilePath ${env:GITHUB_PATH} -Append
100-
101-
- name: Poetry cache
102-
if: ${{ steps.setup-python.outputs.cache-hit != 'true' }}
103-
uses: actions/cache@v4
104-
with:
105-
path: ${{ env.POETRY_CACHE_DIR }}
106-
key: pypoetry-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
107-
restore-keys: |
108-
pypoetry-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}
109-
pypoetry-${{ runner.os }}
93+
"$(Resolve-Path .venv)/Scripts" | Out-File -FilePath ${env:GITHUB_PATH} -Append
11094
11195
- name: Install dependencies
112-
run: poetry install --no-interaction
96+
run: uv sync
11397

11498
- name: Lint and test
11599
run: make lint test
@@ -129,16 +113,16 @@ jobs:
129113
with:
130114
sparse-checkout: |
131115
Dockerfile
132-
poetry.lock
116+
uv.lock
133117
134118
- name: Cache buildkit mounts
135119
uses: actions/cache@v4
136120
with:
137121
path: |
138122
var-cache-apt
139123
root-cache-pip
140-
root-cache-pypoetry
141-
key: buildkit-mounts-${{ runner.os }}-${{ hashFiles('**/Dockerfile', '**/poetry.lock') }}
124+
root-cache-uv
125+
key: buildkit-mounts-${{ runner.os }}-${{ hashFiles('**/Dockerfile', '**/*.lock') }}
142126
restore-keys: |
143127
buildkit-mounts-${{ runner.os }}
144128
buildkit-mounts-${{ runner.os }}
@@ -155,11 +139,11 @@ jobs:
155139
cache-source: root-cache-pip
156140
cache-target: /root/.cache/pip
157141

158-
- name: Inject root-cache-pypoetry into docker
142+
- name: Inject root-cache-uv into docker
159143
uses: reproducible-containers/buildkit-cache-dance@v3
160144
with:
161-
cache-source: root-cache-pypoetry
162-
cache-target: /root/.cache/pypoetry
145+
cache-source: root-cache-uv
146+
cache-target: /root/.cache/uv
163147

164148
- name: Set up Docker Buildx
165149
uses: docker/setup-buildx-action@v3

0 commit comments

Comments
 (0)