From 8ccd60219fd59e5d9f18404d704e40e403645fb3 Mon Sep 17 00:00:00 2001 From: Luke Tainton Date: Wed, 1 Jan 2025 01:16:43 +0000 Subject: [PATCH] feat(ci): cache dependencies --- .gitea/workflows/ci.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 8d05156..fd9ccb3 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -32,11 +32,23 @@ jobs: python-version: "${{ vars.PYTHON_VERSION }}" - name: Setup Poetry - run: curl -sSL https://install.python-poetry.org | python3 - + uses: abatilo/actions-poetry@v3 + # run: curl -sSL https://install.python-poetry.org | python3 - - name: Update PATH run: export PATH="/root/.local/bin:$PATH" + - name: Setup virtual environment + run: | + /root/.local/bin/poetry config virtualenvs.create true --local + /root/.local/bin/poetry config virtualenvs.in-project true --local + + - uses: actions/cache@v3 + name: Define cache for dependencies + with: + path: ./.venv + key: venv-${{ hashFiles('poetry.lock') }} + - name: Install dependencies run: /root/.local/bin/poetry install