fix(ci): Add a cache prestep

This commit is contained in:
Timothy Stewart
2024-01-21 13:06:16 -06:00
parent 7cfcd9727c
commit a2d4e91aa5
2 changed files with 2 additions and 16 deletions

View File

@@ -21,14 +21,6 @@ jobs:
python-version: ${{ env.PYTHON_VERSION }} python-version: ${{ env.PYTHON_VERSION }}
cache: 'pip' # caching pip dependencies 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 - name: Cache Ansible
uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0
with: with:

View File

@@ -30,14 +30,6 @@ jobs:
* fdad:bad:ba55::/64 * fdad:bad:ba55::/64
EOF 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 - name: Download Vagrant boxes for all scenarios
# To save some cache space, all scenarios share the same cache key. # To save some cache space, all scenarios share the same cache key.
# On the other hand, this means that the cache contents should be # On the other hand, this means that the cache contents should be
@@ -46,9 +38,11 @@ jobs:
- name: Set up Python ${{ env.PYTHON_VERSION }} - name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@75f3110429a8c05be0e1bf360334e4cced2b63fa # 2.3.3 uses: actions/setup-python@75f3110429a8c05be0e1bf360334e4cced2b63fa # 2.3.3
id: pip-cache
with: with:
python-version: ${{ env.PYTHON_VERSION }} python-version: ${{ env.PYTHON_VERSION }}
cache: 'pip' # caching pip dependencies 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 - name: Install dependencies
run: | run: |