From db7eb13a53efb7741f6aeca6099bbb14027a02fd Mon Sep 17 00:00:00 2001 From: Eduardo Cardoso Date: Thu, 4 Jan 2024 11:09:00 -0300 Subject: [PATCH] feat: cache pre-commit repository store --- .github/workflows/_build.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/_build.yaml b/.github/workflows/_build.yaml index 3268d4fc..5ac3c8b4 100644 --- a/.github/workflows/_build.yaml +++ b/.github/workflows/_build.yaml @@ -68,6 +68,12 @@ jobs: with: python-version: ${{ matrix.python }} + - name: Set up pre-commit cache + uses: actions/cache@v3 + with: + path: ~/.cache/pre-commit + key: pre-commit|${{ matrix.os }}|${{ matrix.python }}|${{ hashFiles('.pre-commit-config.yaml') }} + # Using the Makefile assumes an activated virtual environment, which doesn't exist # when running in an Action environment (https://github.com/actions/setup-python/issues/359). # Instead we create an empty .venv folder so that the Makefile continues to function