From 07f60364a3dcdc90bd5f41a90a3eb3334ae81dcc Mon Sep 17 00:00:00 2001 From: ddelange <14880945+ddelange@users.noreply.github.com> Date: Fri, 3 Jan 2025 11:50:16 +0100 Subject: [PATCH] :construction_worker: Improve cache --- .github/workflows/CI.yml | 15 +++++---------- .pre-commit-config.yaml | 12 ++++++------ 2 files changed, 11 insertions(+), 16 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 4c4b964..10b68c7 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -28,18 +28,13 @@ jobs: with: python-version: ${{ matrix.python-version }} - - name: Pip cache + - name: Load cache uses: actions/cache@v4 with: - path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('**/requirements/*.txt') }} - - - name: Pre-commit cache - uses: actions/cache@v4 - with: - path: ~/.cache/pre-commit - key: ${{ runner.os }}-pre-commit-${{ matrix.python-version }}-${{ hashFiles('**/requirements/ci.txt') }}-${{ hashFiles('.pre-commit-config.yaml') - }} + path: | + ~/.cache/pre-commit + ~/.cache/pip + key: ${{ runner.os }}-pip-${{ env.pythonLocation }}-${{ hashFiles('**/requirements/*.txt', '.pre-commit-config.yaml') }} - name: Install run: | diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d498cd4..03324b5 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,15 +1,15 @@ --- repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.6.9 + rev: v0.8.5 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] - id: ruff-format -# should be replaced in the future ref https://github.com/astral-sh/ruff/issues/458 +# should be replaced in the future ref https://github.com/astral-sh/ruff/issues/12434 - repo: https://github.com/jsh9/pydoclint - rev: 0.5.9 + rev: 0.5.14 hooks: - id: pydoclint @@ -24,7 +24,7 @@ repos: # should be replaced in the future ref https://github.com/astral-sh/ruff/issues/3792 - repo: https://github.com/asottile/blacken-docs - rev: 1.19.0 + rev: 1.19.1 hooks: - id: blacken-docs additional_dependencies: [black==24.10.0] @@ -39,7 +39,7 @@ repos: pass_filenames: false - repo: https://github.com/pappasam/toml-sort - rev: v0.23.1 + rev: v0.24.2 hooks: - id: toml-sort-fix args: [--trailing-comma-inline-array] @@ -66,7 +66,7 @@ repos: - id: debug-statements - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.29.3 + rev: 0.30.0 hooks: - id: check-dependabot - id: check-github-workflows