From f7006f5df00776144fe7c58d0ee1e0c72ac6ce95 Mon Sep 17 00:00:00 2001 From: Jussi Kukkonen <jkukkonen@vmware.com> Date: Thu, 9 Dec 2021 13:00:30 +0200 Subject: [PATCH] CI: Use builtin package cache support actions/setup-python now supports pip cache: use that instead of handling cache locations manually. Cache invalidates when any requirements file changes (same as before): this is a bit over cautious but probably harder to break. Fixes #1692 Signed-off-by: Jussi Kukkonen <jkukkonen@vmware.com> --- .github/workflows/ci.yml | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0cdadf05e9..3f46283d76 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -47,20 +47,8 @@ jobs: uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} - - - name: Find pip cache dir - id: pip-cache - run: echo "::set-output name=dir::$(pip cache dir)" - - - name: pip cache - uses: actions/cache@v2 - with: - # Use the os dependent pip cache directory found above - path: ${{ steps.pip-cache.outputs.dir }} - # A match with 'key' counts as cache hit - key: ${{ runner.os }}-pip-${{ hashFiles('requirements*.txt') }} - # A match with 'restore-keys' is used as fallback - restore-keys: ${{ runner.os }}-pip- + cache: 'pip' + cache-dependency-path: 'requirements*.txt' - name: Install dependencies run: |