Просмотр исходного кода

fix: cache pre-commit hook environments (#33782)

asottile-sentry 2 лет назад
Родитель
Сommit
f78bbf64dc
1 измененных файлов с 6 добавлено и 0 удалено
  1. 6 0
      .github/workflows/backend.yml

+ 6 - 0
.github/workflows/backend.yml

@@ -161,6 +161,12 @@ jobs:
           # Note this uses a different cache key than other backend-based workflows because this workflows dependencies are different
           cache-files-hash: ${{ hashFiles('requirements-pre-commit.txt') }}
 
+      - uses: actions/cache@v3
+        if: needs.files-changed.outputs.backend == 'true'
+        with:
+          path: ~/.cache/pre-commit
+          key: cache-epoch-1|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }}
+
       - name: Setup pre-commit
         if: needs.files-changed.outputs.backend == 'true'
         env: