From 97705496dc8e440b7b0b7f0d54a108734a7735a2 Mon Sep 17 00:00:00 2001 From: Raiden Sakura Date: Sun, 31 Mar 2024 00:43:39 +0800 Subject: [PATCH] Use caching --- .github/workflows/lint.yml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 7a5011c898..9540bdfa09 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -21,11 +21,16 @@ jobs: with: python-version: ${{ matrix.python-version }} architecture: x64 - - name: Set up Poetry - uses: abatilo/actions-poetry@v3.0.0 - - name: Install dependencies - run: | - poetry install --no-root --only dev + - uses: Gr1N/setup-poetry@v9 + - name: Cache poetry + id: cache-poetry + uses: actions/cache@v4.0.2 + with: + path: ~/.cache/pypoetry/virtualenvs + key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }} + - name: Maybe install dependencies + if: steps.cache-venv.outputs.cache-hit != 'true' + run: poetry install --no-root --only dev - name: Ruff run: poetry run ruff . --no-fix --config pyproject.toml continue-on-error: true