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 5893395 commit 797cca3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ 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
- 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
3 changes: 3 additions & 0 deletions poetry.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[virtualenvs]
create = true
in-project = true

0 comments on commit 797cca3

Please sign in to comment.