@@ -21,14 +21,22 @@ jobs:
2121 steps :
2222 - uses : actions/checkout@v4
2323
24- - name : Install Poetry
25- uses : snok/install-poetry@v1
26-
2724 - name : Set up Python
2825 uses : actions/setup-python@v5
2926 with :
3027 python-version : " 3.10"
31- cache : " poetry"
28+
29+ - name : Install Poetry
30+ run : pipx install poetry
31+
32+ - name : Configure Poetry
33+ run : poetry config virtualenvs.in-project true
34+
35+ - name : Cache virtualenv
36+ uses : actions/cache@v4
37+ with :
38+ path : .venv
39+ key : venv-lint-${{ runner.os }}-3.10-${{ hashFiles('poetry.lock') }}
3240
3341 - name : Install dependencies
3442 run : poetry install --with dev
@@ -46,14 +54,22 @@ jobs:
4654 steps :
4755 - uses : actions/checkout@v4
4856
49- - name : Install Poetry
50- uses : snok/install-poetry@v1
51-
5257 - name : Set up Python
5358 uses : actions/setup-python@v5
5459 with :
5560 python-version : " 3.10"
56- cache : " poetry"
61+
62+ - name : Install Poetry
63+ run : pipx install poetry
64+
65+ - name : Configure Poetry
66+ run : poetry config virtualenvs.in-project true
67+
68+ - name : Cache virtualenv
69+ uses : actions/cache@v4
70+ with :
71+ path : .venv
72+ key : venv-typecheck-${{ runner.os }}-3.10-${{ hashFiles('poetry.lock') }}
5773
5874 - name : Install dependencies
5975 run : poetry install --with dev
@@ -68,14 +84,22 @@ jobs:
6884 steps :
6985 - uses : actions/checkout@v4
7086
71- - name : Install Poetry
72- uses : snok/install-poetry@v1
73-
7487 - name : Set up Python
7588 uses : actions/setup-python@v5
7689 with :
7790 python-version : " 3.10"
78- cache : " poetry"
91+
92+ - name : Install Poetry
93+ run : pipx install poetry
94+
95+ - name : Configure Poetry
96+ run : poetry config virtualenvs.in-project true
97+
98+ - name : Cache virtualenv
99+ uses : actions/cache@v4
100+ with :
101+ path : .venv
102+ key : venv-build-${{ runner.os }}-3.10-${{ hashFiles('poetry.lock') }}
79103
80104 - name : Install dependencies
81105 run : poetry install --only main
@@ -100,14 +124,22 @@ jobs:
100124 steps :
101125 - uses : actions/checkout@v4
102126
103- - name : Install Poetry
104- uses : snok/install-poetry@v1
105-
106127 - name : Set up Python
107128 uses : actions/setup-python@v5
108129 with :
109130 python-version : ${{ matrix.python-version }}
110- cache : " poetry"
131+
132+ - name : Install Poetry
133+ run : pipx install poetry
134+
135+ - name : Configure Poetry
136+ run : poetry config virtualenvs.in-project true
137+
138+ - name : Cache virtualenv
139+ uses : actions/cache@v4
140+ with :
141+ path : .venv
142+ key : venv-tests-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('poetry.lock') }}
111143
112144 - name : Install dependencies
113145 run : poetry install
0 commit comments