Skip to content

Commit 294daea

Browse files
ci: add uv virtual environment cache to setup-uv-project action (#559)
* ci: add uv virtual environment cache to setup-uv-project action Made-with: Cursor * fix: remove uv.lock from cache key (gitignored, never in checkout) Made-with: Cursor * ci: add actions: write permissions and test needs: linting Made-with: Cursor
1 parent 240645e commit 294daea

File tree

5 files changed

+13
-0
lines changed

5 files changed

+13
-0
lines changed

.github/actions/setup-uv-project/action.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,13 @@ runs:
1111
enable-cache: true
1212
github-token: ${{ github.token }}
1313

14+
- name: Cache uv virtual environment
15+
uses: actions/cache@v5
16+
with:
17+
path: .venv
18+
key: uv-venv-${{ runner.os }}-${{ matrix.python-version || '3.11' }}-${{ hashFiles('pyproject.toml') }}
19+
restore-keys: |
20+
uv-venv-${{ runner.os }}-${{ matrix.python-version || '3.11' }}-
21+
1422
- shell: bash
1523
run: uv sync --extra dev

.github/workflows/build.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name: Package Build
33
permissions:
44
contents: read
55
pull-requests: read
6+
actions: write
67

78
on:
89
pull_request:

.github/workflows/docs.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name: Algorithm Docs Generation
33
permissions:
44
contents: read
55
pull-requests: read
6+
actions: write
67

78
on:
89
workflow_dispatch:

.github/workflows/installation.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name: Installation Tests
33
permissions:
44
contents: read
55
pull-requests: read
6+
actions: write
67

78
on:
89
workflow_dispatch:

.github/workflows/tests.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name: Code Quality & Tests
33
permissions:
44
contents: read
55
pull-requests: read
6+
actions: write
67

78
on:
89
push:
@@ -63,6 +64,7 @@ jobs:
6364
run: echo "success=true" >> $GITHUB_OUTPUT
6465

6566
test:
67+
needs: linting
6668
runs-on: pruna-cpu
6769

6870
strategy:

0 commit comments

Comments
 (0)