-
Notifications
You must be signed in to change notification settings - Fork 3
36 lines (31 loc) · 974 Bytes
/
venv-cache.yml
File metadata and controls
36 lines (31 loc) · 974 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: Cache Poetry Virtual Environment
on:
push:
branches: 'main'
jobs:
cache-venv:
name: Cache Poetry Virtual Environment
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.GH_PAT || github.token }}
- name: Set up Python 3.8
uses: actions/setup-python@v3
with:
python-version: 3.8
- name: Install and configure Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
- name: Cache Poetry virtualenv
uses: actions/cache@v2
id: cached-poetry-dependencies
with:
path: .venv
key: poetry-venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
- name: Install Dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction