Skip to content

Commit

Permalink
task(ci): add cache for virtual environment
Browse files Browse the repository at this point in the history
  • Loading branch information
svaponi committed Apr 18, 2024
1 parent ce69a89 commit d3d4ad4
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,17 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Install poetry
uses: abatilo/actions-poetry@v3.0.0
# Cache the virtual environment to speed up build time
# See https://github.com/marketplace/actions/python-poetry-action#workflow-example-cache-the-virtual-environment
- name: Set up a local virtual environment
run: |
poetry config virtualenvs.create true --local
poetry config virtualenvs.in-project true --local
- uses: actions/cache@v3
name: Define cache for the virtual environment
with:
path: ./.venv
key: venv-${{ hashFiles('poetry.lock') }}
- name: Install dependencies
run: poetry install
- name: Run tests
Expand Down

0 comments on commit d3d4ad4

Please sign in to comment.