Skip to content

Commit ab9c0d1

Browse files
committed
add ansible dependency cache
1 parent 2ed1ac0 commit ab9c0d1

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

.github/workflows/pull-request-management.yml

+14-13
Original file line numberDiff line numberDiff line change
@@ -357,16 +357,16 @@ jobs:
357357
path: ~/.cache/pip
358358
key: ${{ runner.os }}-pip-requirements-dev-${{ hashFiles('ansible_collections/arista/avd/requirements-dev.txt') }}-${{ matrix.python_version }}
359359

360-
# Restore cache for ansible-core<2.19.0
360+
# Restore cache for ansible-core
361361
- name: Restore cache for ansible-core
362362
uses: actions/cache@v3
363363
with:
364-
path: ~/.cache/pip
365-
key: ${{ runner.os }}-pip-requirements-dev-${{ hashFiles("ansible-core<2.19.0") }}-${{ matrix.python_version }}
364+
path: ~/.cache/ansible
365+
key: ${{ runner.os }}-pip-ansible-core-${{ matrix.python_version }}
366366

367367
- name: Install ansible requirements
368368
run: |
369-
pip install -r "ansible-core<2.19.0" --upgrade
369+
pip install "ansible-core<2.19.0" --upgrade
370370
371371
# Install Python requirements (both requirements files)
372372
- name: Install Python requirements
@@ -417,13 +417,13 @@ jobs:
417417
- name: Restore cache for ansible-core<2.19.0
418418
uses: actions/cache@v3
419419
with:
420-
path: ~/.cache/pip
421-
key: ${{ runner.os }}-pip-requirements-ci-${{ hashFiles('ansible-core<2.19.0') }}-${{ matrix.python_version }}
420+
path: ~/.cache/ansible
421+
key: ${{ runner.os }}-pip-ansible-core-${{ matrix.python_version }}
422422
restore-keys: |
423-
${{ runner.os }}-pip-requirements-ci-${{ hashFiles('ansible-core<2.19.0') }}-3.10
424-
${{ runner.os }}-pip-requirements-ci-${{ hashFiles('ansible-core<2.19.0') }}-3.11
425-
${{ runner.os }}-pip-requirements-ci-${{ hashFiles('ansible-core<2.19.0') }}-3.12
426-
${{ runner.os }}-pip-requirements-ci-${{ hashFiles('ansible-core<2.19.0') }}-3.13
423+
${{ runner.os }}-pip-ansible-core-3.10
424+
${{ runner.os }}-pip-ansible-core-3.11
425+
${{ runner.os }}-pip-ansible-core-3.12
426+
${{ runner.os }}-pip-ansible-core-3.13
427427
428428
- name: 'Run ansible-test sanity'
429429
run: |
@@ -452,10 +452,11 @@ jobs:
452452
- name: Restore cache for ansible-core<2.19.0
453453
uses: actions/cache@v3
454454
with:
455-
path: ~/.cache/pip
456-
key: ${{ runner.os }}-pip-requirements-ci-${{ hashFiles('ansible-core<2.19.0') }}-3.10
455+
path: ~/.cache/ansible
456+
key: ${{ runner.os }}-pip-ansible-core-3.10
457457
restore-keys: |
458-
${{ runner.os }}-pip-requirements-ci-${{ hashFiles('ansible-core<2.19.0') }}-3.10
458+
${{ runner.os }}-pip-ansible-core-3.10
459+
459460
- name: 'Install Python requirements'
460461
run: |
461462
pip install mock pytest pytest-mock pytest-xdist pyyaml --upgrade

0 commit comments

Comments
 (0)