From f56d8e8fb9142420d0aea082d7552f8d2497f0b1 Mon Sep 17 00:00:00 2001 From: Martijn Pieters Date: Tue, 8 Nov 2022 12:47:17 +0000 Subject: [PATCH] CI: Make setup-python responsible for caching --- .github/workflows/ci.yml | 30 ++++++++++++------------------ 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d9e3685a..afbf41c3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,13 +26,9 @@ jobs: uses: actions/setup-python@v4 with: python-version: 3.x - - 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: @@ -89,17 +85,9 @@ jobs: uses: actions/setup-python@v4 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 dependencies uses: py-actions/py-dependency-install@v3 with: @@ -159,6 +147,9 @@ jobs: uses: actions/setup-python@v4 with: python-version: 3.x + cache: pip + cache-dependency-path: + requirements/*.txt - name: Install cython uses: py-actions/py-dependency-install@v3 with: @@ -212,6 +203,9 @@ jobs: uses: actions/setup-python@v4 with: python-version: 3.x + cache: pip + cache-dependency-path: + requirements/*.txt - name: Install cython uses: py-actions/py-dependency-install@v3 with: