From c57de59873f443db327fb432f70c126fd07e900c Mon Sep 17 00:00:00 2001 From: michalk8 <46717574+michalk8@users.noreply.github.com> Date: Tue, 14 Feb 2023 15:43:28 +0100 Subject: [PATCH] Add pre-commit CI cache (#279) --- .github/workflows/lint.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 1fb457d42..b1f33721e 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -28,6 +28,13 @@ jobs: with: python-version: '3.10' + - name: Cache pre-commit + uses: actions/cache@v3 + if: ${{ matrix.lint-kind == 'code' }} + with: + path: ~/.cache/pre-commit + key: pre-commit-${{ env.pythonLocation }}-${{ hashFiles('**/.pre-commit-config.yaml') }} + - name: Install dependencies run: | python -m pip install --upgrade pip @@ -36,8 +43,8 @@ jobs: - name: Install PyEnchant if: ${{ matrix.lint-kind == 'docs' }} run: | - sudo apt update -y - sudo apt install libenchant-2-dev + sudo apt-get update -y + sudo apt-get install libenchant-2-dev python -m pip install pyenchant - name: Lint ${{ matrix.lint-kind }}