Skip to content

Commit f100c12

Browse files
committed
github: Enable pipx caching for all workflows
1 parent eef36f2 commit f100c12

File tree

3 files changed

+20
-2
lines changed

3 files changed

+20
-2
lines changed

.github/workflows/check_docs.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ on:
55
workflow_dispatch:
66

77
env:
8+
PIPX_BIN_DIR: ~/.local/bin
9+
PIPX_HOME: ~/.local/pipx
810
POETRY_VERSION: 1.8.2
911
PYTHON_VERSION: 3.11.9
1012

@@ -20,6 +22,13 @@ jobs:
2022
id: setup-python
2123
with:
2224
python-version: ${{ env.PYTHON_VERSION }}
25+
- name: Cache pipx
26+
uses: actions/cache@v4
27+
with:
28+
path: |
29+
${{ env.PIPX_HOME }}
30+
${{ env.PIPX_BIN_DIR }}
31+
key: pipx-${{ runner.os }}-py${{ steps.setup-python.outputs.python-version }}-poetry${{ env.POETRY_VERSION }}
2332
- name: Set up Poetry
2433
run: pipx install poetry==${{ env.POETRY_VERSION }} --python '${{ steps.setup-python.outputs.python-path }}'
2534
- name: Check for lock changes

.github/workflows/check_nitypes.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ on:
55
workflow_dispatch:
66

77
env:
8+
PIPX_BIN_DIR: ~/.local/bin
9+
PIPX_HOME: ~/.local/pipx
810
POETRY_VERSION: 1.8.2
911
PYTHON_VERSION: 3.11.9
10-
PIPX_HOME: ~/.local/pipx
11-
PIPX_BIN_DIR: ~/.local/bin
1212

1313
jobs:
1414
check_nitypes:

.github/workflows/run_unit_tests.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ on:
55
workflow_dispatch:
66

77
env:
8+
PIPX_BIN_DIR: ~/.local/bin
9+
PIPX_HOME: ~/.local/pipx
810
POETRY_VERSION: 1.8.2
911

1012
jobs:
@@ -26,6 +28,13 @@ jobs:
2628
id: setup-python
2729
with:
2830
python-version: ${{ matrix.python-version }}
31+
- name: Cache pipx
32+
uses: actions/cache@v4
33+
with:
34+
path: |
35+
${{ env.PIPX_HOME }}
36+
${{ env.PIPX_BIN_DIR }}
37+
key: pipx-${{ runner.os }}-py${{ steps.setup-python.outputs.python-version }}-poetry${{ env.POETRY_VERSION }}
2938
- name: Set up Poetry
3039
run: pipx install poetry==${{ env.POETRY_VERSION }} --python '${{ steps.setup-python.outputs.python-path }}'
3140
- name: Cache virtualenv

0 commit comments

Comments
 (0)