Skip to content

Commit 4b38ebc

Browse files
fix: optimize GitHub Actions workflow to avoid pip cache warning
1 parent e96adfe commit 4b38ebc

File tree

1 file changed

+4
-10
lines changed
  • repo_scaffold/templates/template-python/{{cookiecutter.project_slug}}/.github/workflows

1 file changed

+4
-10
lines changed

repo_scaffold/templates/template-python/{{cookiecutter.project_slug}}/.github/workflows/setup.yaml

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,6 @@ jobs:
4747
uses: actions/setup-python@v5
4848
with:
4949
python-version: ${{ inputs.python-version }}
50-
cache: 'pip'
51-
cache-dependency-path: |
52-
**/requirements*.txt
53-
**/pyproject.toml
54-
**/poetry.lock
55-
**/Pipfile.lock
5650

5751
- name: Install uv
5852
uses: astral-sh/setup-uv@v5
@@ -63,14 +57,14 @@ jobs:
6357
id: get-uv-cache
6458
run: echo "UV_CACHE_DIR=$(uv cache dir)" >> $GITHUB_OUTPUT
6559

60+
- name: Install dependencies
61+
if: ${{ inputs.install-deps != 'none' }}
62+
run: uv sync --extra ${{ inputs.install-deps }}
63+
6664
- name: Cache uv packages
6765
uses: actions/cache@v4
6866
with:
6967
path: ${{ steps.get-uv-cache.outputs.UV_CACHE_DIR }}
7068
key: ${{ runner.os }}-uv-${{ hashFiles('**/pyproject.toml', '**/requirements*.txt') }}
7169
restore-keys: |
7270
${{ runner.os }}-uv-
73-
74-
- name: Install dependencies
75-
if: ${{ inputs.install-deps != 'none' }}
76-
run: uv sync --extra ${{ inputs.install-deps }}

0 commit comments

Comments
 (0)