Skip to content

Commit

Permalink
feat: cache in pipelines
Browse files Browse the repository at this point in the history
  • Loading branch information
christopherfrige committed Mar 12, 2024
1 parent 0411c06 commit 015f0f3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/lint-backend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,14 @@ jobs:
version: 1.5.1
virtualenvs-create: true
virtualenvs-in-project: true
virtualenvs-path: ~/venv


- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v3
with:
path: ./backend/.venv
path: ~/venv
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}


Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/test-backend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
id: cached-poetry
uses: actions/cache@v3
with:
path: ~/.local # the path depends on the OS
path: ~/.local
key: poetry-0


Expand All @@ -43,13 +43,14 @@ jobs:
version: 1.5.1
virtualenvs-create: true
virtualenvs-in-project: true
virtualenvs-path: ~/venv


- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v3
with:
path: ${{ env.pythonLocation }}
path: ~/venv
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}


Expand All @@ -58,9 +59,5 @@ jobs:
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'


- name: Install library
run: poetry install --no-interaction


- name: Run unit tests
run: make run-tests

0 comments on commit 015f0f3

Please sign in to comment.