Skip to content

Commit ff1d3e9

Browse files
committed
CI: add cache to poetry
1 parent fd86ca6 commit ff1d3e9

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ on:
88
branches:
99
- master
1010

11+
env:
12+
POETRY_VERSION: "1.2.1"
13+
1114
jobs:
1215
cs:
1316
name: Coding style checks
@@ -36,8 +39,22 @@ jobs:
3639
path: ~/.cache/pre-commit
3740
key: pre-commit-v1-test-${{ runner.os }}-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('.pre-commit-config.yaml') }}
3841

42+
- name: Cache setup-poetry
43+
id: cache-setup-poetry
44+
uses: actions/cache@v3
45+
with:
46+
path: |
47+
~/.local/share/pypoetry
48+
~/.local/share/virtualenv
49+
~/.local/bin/poetry
50+
key: setup-poetry-v1-${{ runner.os }}-${{ env.POETRY_VERSION }}
51+
3952
- name: Setup poetry
4053
uses: Gr1N/setup-poetry@v7
54+
id: setup_poetry
55+
if: steps.cache-setup-poetry.outputs.cache-hit != 'true'
56+
with:
57+
poetry-version: ${{ env.POETRY_VERSION }}
4158

4259
- name: Bootstrap environment
4360
run: |

0 commit comments

Comments
 (0)