diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ee6bc469a..ac5c3d46e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,13 +32,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: @@ -94,17 +89,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 000000000..d9388a95a --- /dev/null +++ b/CHANGES/694.misc.rst @@ -0,0 +1 @@ +Simplified cache handling in GitHub workflows.