Skip to content

Commit

Permalink
chore: Cache Poetry dependencies and virtual environment in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
turboflo committed Sep 11, 2024
1 parent fc0c63a commit 74e73ea
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,29 @@ jobs:
with:
python-version: ${{ env.PYTHON_VERSION }}

- name: Cache Poetry dependencies
uses: actions/cache@v3
with:
path: ~/.cache/pypoetry
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }}
restore-keys: |
${{ runner.os }}-poetry-
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true

- name: Cache virtual environment
uses: actions/cache@v3
with:
path: .venv
key: ${{ runner.os }}-venv-${{ hashFiles('**/poetry.lock') }}
restore-keys: |
${{ runner.os }}-venv-
- name: Install dependencies
run: |
poetry install --no-interaction --with dev
Expand Down

0 comments on commit 74e73ea

Please sign in to comment.