Skip to content

Commit 2723e75

Browse files
committed
chore(ci): update caching method
1 parent 148fd7c commit 2723e75

File tree

2 files changed

+10
-13
lines changed

2 files changed

+10
-13
lines changed

.github/workflows/pypi.yml

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,31 +8,27 @@ on:
88

99
jobs:
1010
deploy:
11-
runs-on: ubuntu-latest
11+
strategy:
12+
matrix:
13+
os: [windows-latest]
14+
python: ["3.x"]
15+
poetry: ["1.5.1"]
16+
runs-on: ${{ matrix.os }}
1217
timeout-minutes: 10
1318

1419
steps:
1520
- uses: actions/checkout@v2
1621
- uses: actions/setup-python@v2
1722
with:
18-
python-version: "3.x"
23+
python-version: ${{ matrix.python }}
24+
cache: "poetry"
1925

2026
- name: Install poetry
2127
run: |
22-
python -m pip install --upgrade pip poetry
28+
python -m pip install --upgrade pip poetry==${{ matrix.poetry }}
2329
poetry config virtualenvs.in-project true
2430
25-
- name: Cache poetry
26-
id: cached-poetry-dependencies
27-
uses: actions/cache@v2
28-
with:
29-
# This path is specific to Ubuntu
30-
path: .venv
31-
# Look to see if there is a cache hit for the corresponding requirements file
32-
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
33-
3431
- name: Install dependencies
35-
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
3632
run: |
3733
poetry install
3834

.github/workflows/python-ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ jobs:
2626
- uses: actions/setup-python@v2
2727
with:
2828
python-version: ${{ matrix.python }}
29+
cache: "poetry"
2930

3031
- name: Install poetry
3132
run: |

0 commit comments

Comments
 (0)