From 4474d03366049562bb8d442bd4a2307e45821901 Mon Sep 17 00:00:00 2001 From: Mike Fiedler Date: Sun, 12 Jun 2022 11:25:55 -0400 Subject: [PATCH] chore: replace custom cache step with config The `actions/setup-python@v2` and higher included a built-in cache restore and post-run save step, meaning we can now retire our custom steps for the configuration we want and gain some speed here. Refs: https://github.com/actions/setup-python/pull/266 Refs: https://github.com/actions/setup-python#caching-packages-dependencies Signed-off-by: Mike Fiedler --- .github/workflows/ci.yml | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bfb7e5142622..2686f07d5dd2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -68,18 +68,10 @@ jobs: if: ${{ matrix.needs-python }} with: python-version-file: '.python-version' - - name: Cache Python dependencies - if: ${{ matrix.needs-python }} - uses: actions/cache@v3 - env: - cache-name: warehouse-cache-pip - with: - path: ~/.cache/pip - key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('requirements.txt', 'requirements/*.txt') }} - restore-keys: | - ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}- - ${{ runner.os }}-${{ github.job }}- - ${{ runner.os }}- + cache: 'pip' + cache-dependency-path: | + - 'requirements.txt' + - 'requirements/*.txt' - name: Install Python dependencies if: ${{ matrix.needs-python }} run: |