Skip to content

Commit 2ed1ac0

Browse files
committed
update restore keys for ansible-core
1 parent 75535af commit 2ed1ac0

File tree

1 file changed

+34
-5
lines changed

1 file changed

+34
-5
lines changed

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

+34-5
Original file line numberDiff line numberDiff line change
@@ -357,10 +357,21 @@ 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
361+
- name: Restore cache for ansible-core
362+
uses: actions/cache@v3
363+
with:
364+
path: ~/.cache/pip
365+
key: ${{ runner.os }}-pip-requirements-dev-${{ hashFiles("ansible-core<2.19.0") }}-${{ matrix.python_version }}
366+
367+
- name: Install ansible requirements
368+
run: |
369+
pip install -r "ansible-core<2.19.0" --upgrade
370+
360371
# Install Python requirements (both requirements files)
361372
- name: Install Python requirements
362373
run: |
363-
pip install "ansible-core<2.19.0" -r .github/requirements-ci.txt --upgrade
374+
pip install -r .github/requirements-ci.txt --upgrade
364375
pip install -r ansible_collections/arista/avd/requirements-dev.txt --upgrade
365376
366377
# # Save cache for requirements-ci.txt
@@ -391,6 +402,7 @@ jobs:
391402
3.11
392403
3.12
393404
3.13
405+
394406
- name: Restore cache for requirements-ci.txt
395407
uses: actions/cache@v3
396408
with:
@@ -401,9 +413,18 @@ jobs:
401413
${{ runner.os }}-pip-requirements-ci-${{ hashFiles('.github/requirements-ci.txt') }}-3.11
402414
${{ runner.os }}-pip-requirements-ci-${{ hashFiles('.github/requirements-ci.txt') }}-3.12
403415
${{ runner.os }}-pip-requirements-ci-${{ hashFiles('.github/requirements-ci.txt') }}-3.13
404-
- name: 'Install Python requirements'
405-
run: |
406-
pip install "ansible-core<2.19.0" --upgrade
416+
417+
- name: Restore cache for ansible-core<2.19.0
418+
uses: actions/cache@v3
419+
with:
420+
path: ~/.cache/pip
421+
key: ${{ runner.os }}-pip-requirements-ci-${{ hashFiles('ansible-core<2.19.0') }}-${{ matrix.python_version }}
422+
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
427+
407428
- name: 'Run ansible-test sanity'
408429
run: |
409430
cd ansible_collections/arista/avd/
@@ -427,9 +448,17 @@ jobs:
427448
key: ${{ runner.os }}-pip-requirements-ci-${{ hashFiles('.github/requirements-ci.txt') }}-3.10
428449
restore-keys: |
429450
${{ runner.os }}-pip-requirements-ci-${{ hashFiles('.github/requirements-ci.txt') }}-3.10
451+
452+
- name: Restore cache for ansible-core<2.19.0
453+
uses: actions/cache@v3
454+
with:
455+
path: ~/.cache/pip
456+
key: ${{ runner.os }}-pip-requirements-ci-${{ hashFiles('ansible-core<2.19.0') }}-3.10
457+
restore-keys: |
458+
${{ runner.os }}-pip-requirements-ci-${{ hashFiles('ansible-core<2.19.0') }}-3.10
430459
- name: 'Install Python requirements'
431460
run: |
432-
pip install mock pytest pytest-mock pytest-xdist pyyaml "ansible-core<2.19.0" -r '.github/requirements-ci.txt' --upgrade
461+
pip install mock pytest pytest-mock pytest-xdist pyyaml --upgrade
433462
- name: 'Run ansible-test units test cases'
434463
run: |
435464
cd ansible_collections/arista/avd/

0 commit comments

Comments
 (0)