From bee11c8b3818c958b0d6bc22f7196d5c2ac6e3ec Mon Sep 17 00:00:00 2001 From: Nicco Kunzmann Date: Wed, 30 Aug 2023 07:36:47 +0100 Subject: [PATCH 1/2] Move pip cache into Python setup This is now possible: https://github.com/actions/setup-python#caching-packages-dependencies --- .github/workflows/tests.yml | 13 +++---------- CHANGES.rst | 1 + 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e5f08ac3..5f072c54 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -28,19 +28,12 @@ jobs: runs-on: ubuntu-latest name: ${{ matrix.config[1] }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.config[0] }} - - name: Pip cache - uses: actions/cache@v2 - with: - path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ matrix.config[0] }}-${{ hashFiles('setup.*', 'tox.ini') }} - restore-keys: | - ${{ runner.os }}-pip-${{ matrix.config[0] }}- - ${{ runner.os }}-pip- + cache: 'pip' - name: Install dependencies run: | python -m pip install --upgrade pip diff --git a/CHANGES.rst b/CHANGES.rst index 62053c99..ec985121 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -7,6 +7,7 @@ Changelog Minor changes: - No longer run the ``plone.app.event`` tests. +- Move pip caching into Python setup action. Breaking changes: From 0337179a0fda02a20e058b1e1cae1000308b6389 Mon Sep 17 00:00:00 2001 From: Nicco Kunzmann Date: Wed, 30 Aug 2023 07:48:55 +0100 Subject: [PATCH 2/2] Add keys for caching --- .github/workflows/tests.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 5f072c54..ec0ff317 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -33,7 +33,13 @@ jobs: uses: actions/setup-python@v4 with: python-version: ${{ matrix.config[0] }} + # for caching, see + # https://github.com/actions/setup-python/blob/main/docs/advanced-usage.md#caching-packages cache: 'pip' + cache-dependency-path: | + setup.* + tox.ini + requirements*.txt - name: Install dependencies run: | python -m pip install --upgrade pip