Skip to content

Commit 35391a3

Browse files
committed
ci: avoid setup-uv cache collisions
1 parent f39fa7b commit 35391a3

2 files changed

Lines changed: 13 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ jobs:
2424
with:
2525
python-version: ${{ matrix.python-version }}
2626
enable-cache: true
27+
cache-suffix: test-${{ matrix.python-version }}
2728
# tox-gh-actions maps the running interpreter to the matching env via the
2829
# [gh-actions] table in tox.ini (PyPy keyed as `pypy-3.10` / `pypy-3.11`).
2930
# COVERAGE_FILE gives each cell a unique data file for the combine job.
@@ -42,6 +43,8 @@ jobs:
4243
steps:
4344
- uses: actions/checkout@v7
4445
- uses: astral-sh/setup-uv@v8.2.0
46+
with:
47+
cache-suffix: lint
4548
- run: uvx --with tox-uv tox -e lint
4649

4750
type-check:
@@ -53,20 +56,26 @@ jobs:
5356
steps:
5457
- uses: actions/checkout@v7
5558
- uses: astral-sh/setup-uv@v8.2.0
59+
with:
60+
cache-suffix: type-check-${{ matrix.checker }}
5661
- run: uvx --with tox-uv tox -e ${{ matrix.checker }}
5762

5863
codespell:
5964
runs-on: ubuntu-latest
6065
steps:
6166
- uses: actions/checkout@v7
6267
- uses: astral-sh/setup-uv@v8.2.0
68+
with:
69+
cache-suffix: codespell
6370
- run: uvx --with tox-uv tox -e codespell
6471

6572
docs:
6673
runs-on: ubuntu-latest
6774
steps:
6875
- uses: actions/checkout@v7
6976
- uses: astral-sh/setup-uv@v8.2.0
77+
with:
78+
cache-suffix: docs
7079
- run: uvx --with tox-uv tox -e docs
7180

7281
coverage:
@@ -75,6 +84,8 @@ jobs:
7584
steps:
7685
- uses: actions/checkout@v7
7786
- uses: astral-sh/setup-uv@v8.2.0
87+
with:
88+
cache-suffix: coverage
7889
- uses: actions/download-artifact@v8
7990
with:
8091
pattern: coverage-*

.github/workflows/publish.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ jobs:
1010
steps:
1111
- uses: actions/checkout@v7
1212
- uses: astral-sh/setup-uv@v8.2.0
13+
with:
14+
cache-suffix: publish-build
1315
- run: uv build
1416
- uses: actions/upload-artifact@v7
1517
with:

0 commit comments

Comments
 (0)