From 6bf9350c1f5feffff3f680816f539ea156de56ab Mon Sep 17 00:00:00 2001 From: Mariusz Felisiak Date: Mon, 21 Mar 2022 11:40:19 +0100 Subject: [PATCH] Simplified caching in Github actions configuration. --- .github/workflows/ci.yml | 22 ++++------------------ CHANGES/694.misc.rst | 1 + 2 files changed, 5 insertions(+), 18 deletions(-) create mode 100644 CHANGES/694.misc.rst diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ec93bd52..a082c2b4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,13 +33,8 @@ jobs: uses: actions/setup-python@v3 with: python-version: 3.8 - - name: Cache PyPI - uses: actions/cache@v3 - with: - key: pip-lint-${{ hashFiles('requirements/*.txt') }} - path: ~/.cache/pip - restore-keys: | - pip-lint- + cache: 'pip' + cache-dependency-path: 'requirements/*.txt' - name: Install dependencies uses: py-actions/py-dependency-install@v3 with: @@ -95,17 +90,8 @@ jobs: uses: actions/setup-python@v3 with: python-version: ${{ matrix.pyver }} - - name: Get pip cache dir - id: pip-cache - run: | - echo "::set-output name=dir::$(pip cache dir)" # - name: Cache - - name: Cache PyPI - uses: actions/cache@v3 - with: - key: pip-ci-${{ runner.os }}-${{ matrix.pyver }}-{{ matrix.no-extensions }}-${{ hashFiles('requirements/*.txt') }} - path: ${{ steps.pip-cache.outputs.dir }} - restore-keys: | - pip-ci-${{ runner.os }}-${{ matrix.pyver }}-{{ matrix.no-extensions }}- + cache: 'pip' + cache-dependency-path: 'requirements/*.txt' - name: Install cython if: ${{ matrix.no-extensions == '' }} uses: py-actions/py-dependency-install@v3 diff --git a/CHANGES/694.misc.rst b/CHANGES/694.misc.rst new file mode 100644 index 00000000..d9388a95 --- /dev/null +++ b/CHANGES/694.misc.rst @@ -0,0 +1 @@ +Simplified cache handling in GitHub workflows.