Skip to content

Commit

Permalink
Cache Poetry venv in CI (#697)
Browse files Browse the repository at this point in the history
  • Loading branch information
vighneshiyer authored Jan 20, 2023
1 parent c1bbe4b commit c5e0745
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,14 @@ jobs:
virtualenvs-create: true
virtualenvs-in-project: true
version: ${{ env.POETRY_VERSION }}
- name: Load Cached Poetry virtualenv
id: cached-venv
uses: actions/cache@v3
with:
path: .venv
key: venv-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }}
- name: Create Poetry env
if: steps.cached-venv.outputs.cache-hit != 'true'
run: |
poetry config virtualenvs.in-project true
poetry install --no-ansi
Expand Down

0 comments on commit c5e0745

Please sign in to comment.