From f5b5298bbe77c52ae0d8b01b3c44fc22cdce35c3 Mon Sep 17 00:00:00 2001 From: MarkKoz Date: Mon, 2 Mar 2020 19:33:13 -0800 Subject: CI: add a restore key for the pre-commit cache A cache for an outdated pre-commit environment may still be useful. It may be the case that only some hooks need to be updated rather than all. --- azure-pipelines.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 902bfcd56..fa85e6045 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -32,7 +32,9 @@ jobs: - task: Cache@2 displayName: 'Restore pre-commit environment' inputs: - key: pre-commit | .pre-commit-config.yaml | "$(PythonVersion.pythonLocation)" + key: pre-commit | "$(PythonVersion.pythonLocation)" | .pre-commit-config.yaml + restoreKeys: | + pre-commit | "$(PythonVersion.pythonLocation)" path: $(PRE_COMMIT_HOME) - script: pre-commit run --all-files --show-diff-on-failure -- cgit v1.2.3