]> git.ipfire.org Git - thirdparty/fastapi/fastapi.git/commitdiff
👷 Add cache for pre-commit hooks
authorSebastián Ramírez <tiangolo@gmail.com>
Thu, 15 Aug 2024 00:34:46 +0000 (19:34 -0500)
committerSebastián Ramírez <tiangolo@gmail.com>
Thu, 15 Aug 2024 00:34:46 +0000 (19:34 -0500)
.github/workflows/autofix.yml

index 31a009c27d87adccefbe33585536d6787af418f2..7f0c7733452bd98bdf707cf80054c7634065dab3 100644 (file)
@@ -31,6 +31,11 @@ jobs:
       - name: Get changed files
         id: changed-files
         uses: tj-actions/changed-files@v44
+      - uses: actions/cache@v4
+        id: pre-commit-hooks-cache
+        with:
+          path: ~/.cache/pre-commit
+          key: ${{ runner.os }}-pre-commit-hooks-${{ hashFiles('.pre-commit-config.yml') }}-v01
       - run: pre-commit run ${{ steps.changed-files.outputs.all_changed_files }}
       # Allow debugging with tmate
       - name: Setup tmate session