@@ -106,10 +106,12 @@ jobs:
106
106
- uses : actions/checkout@v4
107
107
- name : Set up Python 3
108
108
uses : actions/setup-python@v5
109
+ id : pipcache
109
110
with :
110
111
python-version : ${{ matrix.python_version }}
111
112
cache : ' pip'
112
113
- name : ' Install Python requirements'
114
+ if : steps.pipcache.outputs.cache-hit != 'true'
113
115
run : |
114
116
pip install -r .github/requirements-ci.txt -r ansible_collections/arista/avd/requirements-dev.txt --upgrade
115
117
@@ -340,14 +342,6 @@ jobs:
340
342
3.12
341
343
3.13
342
344
cache : ' pip'
343
- # - name: Cache ansible-core dependencies
344
- # id: cache-ansible
345
- # uses: actions/cache@v3
346
- # with:
347
- # path: ~/.cache/ansible-core
348
- # key: ${{ runner.os }}-ansible-core-<2.19.0
349
- # restore-keys: |
350
- # ${{ runner.os }}-ansible-core-
351
345
- name : ' Install Python requirements'
352
346
if : steps.pipcache.outputs.cache-hit != 'true'
353
347
run : |
@@ -365,11 +359,13 @@ jobs:
365
359
- uses : actions/checkout@v4
366
360
- name : Set up Python 3
367
361
uses : actions/setup-python@v5
362
+ id : pipcache
368
363
with :
369
364
python-version : |
370
365
3.10
371
366
cache : ' pip'
372
367
- name : ' Install Python requirements'
368
+ if : steps.pipcache.outputs.cache-hit != 'true'
373
369
run : |
374
370
pip install mock pytest pytest-mock pytest-xdist pyyaml "ansible-core<2.19.0" -r .github/requirements-ci.txt --upgrade
375
371
- name : ' Run ansible-test units test cases'
@@ -385,12 +381,14 @@ jobs:
385
381
- uses : actions/checkout@v4
386
382
- name : Set up Python 3
387
383
uses : actions/setup-python@v5
384
+ id : pipcache
388
385
with :
389
386
python-version : |
390
387
3.12
391
388
3.13
392
389
cache : ' pip'
393
390
- name : ' Install Python requirements'
391
+ if : steps.pipcache.outputs.cache-hit != 'true'
394
392
run : |
395
393
pip install "ansible-core<2.19.0" -r .github/requirements-ci.txt --upgrade
396
394
- name : ' Run ansible-test integration test cases'
@@ -413,6 +411,8 @@ jobs:
413
411
3.12
414
412
3.13
415
413
cache : ' pip'
414
+
415
+ # # create a separate step to cache insatalling ansible-galaxy collection install -r ansible_collections/arista/avd/collections.yml
416
416
- name : ' Install Python & Ansible requirements'
417
417
run : |
418
418
pip install -r .github/requirements-ci.txt -r ansible_collections/arista/avd/requirements-dev.txt --upgrade
@@ -436,6 +436,8 @@ jobs:
436
436
python-version : |
437
437
3.10
438
438
cache : ' pip'
439
+
440
+ # create a separate step to cache insatalling ansible-galaxy collection install -r ansible_collections/arista/avd/collections.yml
439
441
- name : ' Install Python & Ansible requirements'
440
442
run : |
441
443
pip install "ansible-core<2.19.0" -r .github/requirements-ci.txt --upgrade
@@ -473,10 +475,12 @@ jobs:
473
475
- uses : actions/checkout@v4
474
476
- name : Set up Python 3
475
477
uses : actions/setup-python@v5
478
+ id : pipcache
476
479
with :
477
480
python-version : ${{ matrix.python }}
478
481
cache : ' pip'
479
482
- name : ' Install tox'
483
+ if : steps.pipcache.outputs.cache-hit != 'true'
480
484
run : |
481
485
pip install tox tox-gh-actions --upgrade
482
486
- name : " Run pytest via tox for ${{ matrix.python }}"
0 commit comments