From a2d4e91aa555b3834df532ae0ea9417792afeee5 Mon Sep 17 00:00:00 2001 From: Timothy Stewart Date: Sun, 21 Jan 2024 13:06:16 -0600 Subject: [PATCH] fix(ci): Add a cache prestep --- .github/workflows/lint.yml | 8 -------- .github/workflows/test.yml | 10 ++-------- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index f545e4e..4f7b4c3 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -21,14 +21,6 @@ jobs: python-version: ${{ env.PYTHON_VERSION }} cache: 'pip' # caching pip dependencies - - name: Cache pip - uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 - with: - path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ hashFiles('./requirements.txt') }} - restore-keys: | - ${{ runner.os }}-pip- - - name: Cache Ansible uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 with: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e570917..eb2a2e5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -30,14 +30,6 @@ jobs: * fdad:bad:ba55::/64 EOF - - name: Restore pip - uses: actions/cache/restore@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 - id: cache - with: - path: ~/.cache/pip - key: ${{ runner.os }}-pip- - fail-on-cache-miss: true - - name: Download Vagrant boxes for all scenarios # To save some cache space, all scenarios share the same cache key. # On the other hand, this means that the cache contents should be @@ -46,9 +38,11 @@ jobs: - name: Set up Python ${{ env.PYTHON_VERSION }} uses: actions/setup-python@75f3110429a8c05be0e1bf360334e4cced2b63fa # 2.3.3 + id: pip-cache with: python-version: ${{ env.PYTHON_VERSION }} cache: 'pip' # caching pip dependencies + - run: echo '${{ steps.pip-cache.outputs.cache-hit }}' # true if cache-hit occurred on the primary key - name: Install dependencies run: |