Add uv build cache

This commit is contained in:
Keannu Christian Bernasol 2025-09-14 01:14:58 +08:00
parent 76875239fc
commit ea159013ee
2 changed files with 6 additions and 2 deletions

View file

@ -8,10 +8,12 @@ steps:
image: astral/uv:python3.13-trixie-slim image: astral/uv:python3.13-trixie-slim
# TODO: Change src path # TODO: Change src path
commands: commands:
- uv sync --frozen - uv sync --frozen --cache-dir /.cache/uv --link-mode=copy
- export PATH=".venv/bin:$PATH" - export PATH=".venv/bin:$PATH"
- ruff check src/. --no-fix --diff - ruff check src/. --no-fix --diff
- isort --check --diff src/. - isort --check --diff src/.
volumes:
- /tmp/.uv:/.cache/uv # Optimization: Shared UV cache on local build server
- name: discord - name: discord
image: appleboy/drone-discord image: appleboy/drone-discord
settings: settings:

View file

@ -11,9 +11,11 @@ steps:
# variable: # variable:
# from_secret: variable # from_secret: variable
commands: commands:
- uv sync --frozen - uv sync --frozen --cache-dir /.cache/uv --link-mode=copy
- export PATH=".venv/bin:$PATH" - export PATH=".venv/bin:$PATH"
- pytest - pytest
volumes:
- /tmp/.uv:/.cache/uv # Optimization: Shared UV cache on local build server
- name: discord - name: discord
image: appleboy/drone-discord image: appleboy/drone-discord
settings: settings: