Skip to content

Commit 49f8d20

Browse files
authored
Set uv cache to runner (cytomining#720)
* set uv cache to runner * fix precommit * lint
1 parent 7ca30da commit 49f8d20

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

.github/actions/setup-env/action.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ runs:
3737
# version or the default packages change. Both of the remaining
3838
# cache keys depend on PY.
3939
shell: bash
40-
run:
41-
echo "PY=$((python -VV; pip freeze) | shasum -a 256 | cut -d' ' -f1)" >>
42-
$GITHUB_ENV
40+
run: |
41+
echo "PY=$( (python -VV; pip freeze) | shasum -a 256 | cut -d' ' -f1)" >> $GITHUB_ENV
42+
echo "UV_CACHE_DIR=${{ runner.temp }}/.cache/uv" >> $GITHUB_ENV
4343
- name: Cache pre-commit installation
4444
# The cache key for the pre-commit installation is a hash of the
4545
# operating system, PY (see above), and the pre-commit config.
@@ -62,7 +62,7 @@ runs:
6262
with:
6363
path: |
6464
.cache
65-
.cache/uv
65+
${{ runner.temp }}/.cache/uv
6666
.venv
6767
key:
6868
cache|${{ runner.os }}|${{ runner.arch }}|${{ env.PY }}|${{ hashFiles('pyproject.toml') }}|${{

.github/workflows/integration-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ env:
2424
PYTEST_ADDOPTS: ${{ github.event.inputs.pytest_addopts }}
2525
PYTHONIOENCODING: "UTF-8"
2626
TARGET_PYTHON_VERSION: "3.10"
27-
UV_CACHE_DIR: ${{ github.workspace }}/.cache/uv
27+
UV_CACHE_DIR: ${{ github.workspace }}/.cache/uv # overridden per-job by setup-env action via $GITHUB_ENV
2828

2929
jobs:
3030
quality-test:

0 commit comments

Comments
 (0)