File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed
repo_scaffold/templates/template-python/{{cookiecutter.project_slug}}/.github/workflows Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change 1
1
name : Reusable Setup
2
-
3
2
on :
4
3
workflow_call :
5
4
inputs :
6
5
python-version :
7
6
required : false
8
7
type : string
9
- default : " {{cookiecutter.max_python_version}} "
8
+ default : " 3.12 "
10
9
install-deps :
11
10
required : false
12
11
type : string
47
46
uses : actions/setup-python@v5
48
47
with :
49
48
python-version : ${{ inputs.python-version }}
49
+ cache : ' pip'
50
+ cache-dependency-path : |
51
+ **/requirements*.txt
52
+ **/pyproject.toml
53
+ **/poetry.lock
54
+ **/Pipfile.lock
50
55
51
56
- name : Install uv
52
57
uses : astral-sh/setup-uv@v5
@@ -57,14 +62,14 @@ jobs:
57
62
id : get-uv-cache
58
63
run : echo "UV_CACHE_DIR=$(uv cache dir)" >> $GITHUB_OUTPUT
59
64
60
- - name : Install dependencies
61
- if : ${{ inputs.install-deps != 'none' }}
62
- run : uv sync --extra ${{ inputs.install-deps }}
63
-
64
65
- name : Cache uv packages
65
66
uses : actions/cache@v4
66
67
with :
67
68
path : ${{ steps.get-uv-cache.outputs.UV_CACHE_DIR }}
68
69
key : ${{ runner.os }}-uv-${{ hashFiles('**/pyproject.toml', '**/requirements*.txt') }}
69
70
restore-keys : |
70
71
${{ runner.os }}-uv-
72
+
73
+ - name : Install dependencies
74
+ if : ${{ inputs.install-deps != 'none' }}
75
+ run : uv sync --extra ${{ inputs.install-deps }}
You can’t perform that action at this time.
0 commit comments