From f550d2247564bbf8a286ea5e7ac8b1b78621ef19 Mon Sep 17 00:00:00 2001 From: airwish Date: Thu, 19 Sep 2024 23:51:32 +0800 Subject: [PATCH] Update workflows (#13) --- .github/workflows/workflow.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 7a1144a..2f67406 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -17,6 +17,7 @@ jobs: uses: actions/checkout@v4 - name: Set up Python + id: setup-python uses: actions/setup-python@v5 with: python-version: 3.11 @@ -28,15 +29,20 @@ jobs: virtualenvs-in-project: true installer-parallel: true + - name: Check virtual environment + run: | + poetry --version + poetry check + - name: Load cached venv - id: cached-poetry-dependencies uses: actions/cache@v4 with: - path: .venv + path: ~/.venv key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} + restore-keys: | + venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}- - name: Install dependencies - if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' run: poetry install --with dev --no-root --no-interaction - name: Run Script