From 8ca8ebd66e3ee0c92687fb69d2605cb84d392af0 Mon Sep 17 00:00:00 2001 From: Gil Forcada Codinachs Date: Thu, 2 Nov 2023 09:31:52 +0100 Subject: [PATCH] cache pip and pre-commit --- .github/workflows/testing.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 0eef729..79f07ff 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -19,6 +19,13 @@ jobs: uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} + - name: Cache packages + uses: actions/cache@v3 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('tox.ini') }} + restore-keys: | + ${{ runner.os }}-pip-${{ matrix.python-version }}- - name: Install dependencies run: python -m pip install tox - name: Test @@ -39,7 +46,9 @@ jobs: - name: Cache packages uses: actions/cache@v3 with: - path: ~/.cache/pre-commit + path: | + ~/.cache/pre-commit + ~/.cache/pip key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('tox.ini') }} restore-keys: | ${{ runner.os }}-pip-${{ matrix.python-version }}-