Skip to content

Commit 1426b34

Browse files
committed
cache: pip for all jobs
1 parent ebd0fa1 commit 1426b34

File tree

1 file changed

+104
-100
lines changed

1 file changed

+104
-100
lines changed

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

+104-100
Original file line numberDiff line numberDiff line change
@@ -370,105 +370,109 @@ jobs:
370370
cd ansible_collections/arista/avd/
371371
ansible-test units -vv
372372
373-
# ansible_test_integration:
374-
# name: Run ansible-test integration test cases
375-
# runs-on: ubuntu-latest
376-
# needs: [ file-changes ]
377-
# steps:
378-
# - uses: actions/checkout@v4
379-
# - name: Set up Python 3
380-
# uses: actions/setup-python@v5
381-
# with:
382-
# python-version: |
383-
# 3.12
384-
# 3.13
385-
# - name: 'Install Python requirements'
386-
# run: |
387-
# pip install "ansible-core<2.19.0" -r .github/requirements-ci.txt --upgrade
388-
# - name: 'Run ansible-test integration test cases'
389-
# run: |
390-
# cd ansible_collections/arista/avd/
391-
# ansible-test integration -vv
373+
ansible_test_integration:
374+
name: Run ansible-test integration test cases
375+
runs-on: ubuntu-latest
376+
needs: [ file-changes ]
377+
steps:
378+
- uses: actions/checkout@v4
379+
- name: Set up Python 3
380+
uses: actions/setup-python@v5
381+
with:
382+
python-version: |
383+
3.12
384+
3.13
385+
cache: 'pip'
386+
- name: 'Install Python requirements'
387+
run: |
388+
pip install "ansible-core<2.19.0" -r .github/requirements-ci.txt --upgrade
389+
- name: 'Run ansible-test integration test cases'
390+
run: |
391+
cd ansible_collections/arista/avd/
392+
ansible-test integration -vv
392393
393-
# ansible_lint:
394-
# name: Run ansible-lint test case
395-
# runs-on: ubuntu-latest
396-
# needs: [ file-changes ]
397-
# steps:
398-
# - uses: actions/checkout@v4
399-
# - name: Set up Python 3
400-
# uses: actions/setup-python@v5
401-
# with:
402-
# python-version: |
403-
# 3.10
404-
# 3.11
405-
# 3.12
406-
# 3.13
407-
# - name: 'Install Python & Ansible requirements'
408-
# run: |
409-
# pip install -r .github/requirements-ci.txt -r ansible_collections/arista/avd/requirements-dev.txt --upgrade
410-
# ansible-galaxy collection install -r ansible_collections/arista/avd/collections.yml
411-
# - name: 'Run ansible-test integration test cases'
412-
# run: |
413-
# cd ansible_collections/arista/avd/
414-
# ansible-lint --force-color --strict -v
415-
# # ----------------------------------- #
416-
# # Galaxy Importer
417-
# # ----------------------------------- #
418-
# galaxy_importer:
419-
# name: Test galaxy-importer
420-
# runs-on: ubuntu-20.04 # Older version to be compatible with old python
421-
# env:
422-
# GALAXY_IMPORTER_CONFIG: galaxy-importer/galaxy-importer.cfg
423-
# steps:
424-
# - uses: actions/setup-python@v5
425-
# with:
426-
# python-version: |
427-
# 3.10
428-
# - uses: actions/checkout@v4
429-
# - name: 'Install Python & Ansible requirements'
430-
# run: |
431-
# pip install "ansible-core<2.19.0" -r .github/requirements-ci.txt --upgrade
432-
# ansible-galaxy collection install -r ansible_collections/arista/avd/collections.yml
433-
# - name: Install galaxy-importer
434-
# # Install the specific version of galaxy-importer used on galaxy.ansible.com
435-
# # The version conflicts with our requirements,
436-
# # so we let the galaxy-importer version resolve remaining requirements.
437-
# run: |
438-
# pip install "galaxy-importer==0.4.25"
439-
# - name: 'Build ansible package'
440-
# run: make collection-build
441-
# - name: 'Run galaxy-importer checks'
442-
# run: python -m galaxy_importer.main *.tar.gz
443-
# - uses: actions/upload-artifact@v4
444-
# with:
445-
# name: importer-logs
446-
# path: ./importer_result.json
394+
ansible_lint:
395+
name: Run ansible-lint test case
396+
runs-on: ubuntu-latest
397+
needs: [ file-changes ]
398+
steps:
399+
- uses: actions/checkout@v4
400+
- name: Set up Python 3
401+
uses: actions/setup-python@v5
402+
with:
403+
python-version: |
404+
3.10
405+
3.11
406+
3.12
407+
3.13
408+
cache: 'pip'
409+
- name: 'Install Python & Ansible requirements'
410+
run: |
411+
pip install -r .github/requirements-ci.txt -r ansible_collections/arista/avd/requirements-dev.txt --upgrade
412+
ansible-galaxy collection install -r ansible_collections/arista/avd/collections.yml
413+
- name: 'Run ansible-test integration test cases'
414+
run: |
415+
cd ansible_collections/arista/avd/
416+
ansible-lint --force-color --strict -v
417+
# ----------------------------------- #
418+
# Galaxy Importer
419+
# ----------------------------------- #
420+
galaxy_importer:
421+
name: Test galaxy-importer
422+
runs-on: ubuntu-20.04 # Older version to be compatible with old python
423+
env:
424+
GALAXY_IMPORTER_CONFIG: galaxy-importer/galaxy-importer.cfg
425+
steps:
426+
- uses: actions/checkout@v4
427+
- uses: actions/setup-python@v5
428+
with:
429+
python-version: |
430+
3.10
431+
cache: 'pip'
432+
- name: 'Install Python & Ansible requirements'
433+
run: |
434+
pip install "ansible-core<2.19.0" -r .github/requirements-ci.txt --upgrade
435+
ansible-galaxy collection install -r ansible_collections/arista/avd/collections.yml
436+
- name: Install galaxy-importer
437+
# Install the specific version of galaxy-importer used on galaxy.ansible.com
438+
# The version conflicts with our requirements,
439+
# so we let the galaxy-importer version resolve remaining requirements.
440+
run: |
441+
pip install "galaxy-importer==0.4.25"
442+
- name: 'Build ansible package'
443+
run: make collection-build
444+
- name: 'Run galaxy-importer checks'
445+
run: python -m galaxy_importer.main *.tar.gz
446+
- uses: actions/upload-artifact@v4
447+
with:
448+
name: importer-logs
449+
path: ./importer_result.json
447450

448-
# # ----------------------------------- #
449-
# # Test of pyavd
450-
# # ----------------------------------- #
451-
# pyavd:
452-
# name: Test pyavd
453-
# runs-on: ubuntu-latest
454-
# needs: [file-changes]
455-
# if: |
456-
# needs.file-changes.outputs.eos_design == 'true' ||
457-
# needs.file-changes.outputs.config_gen == 'true' ||
458-
# needs.file-changes.outputs.pyavd == 'true'
459-
# strategy:
460-
# matrix:
461-
# python: ["3.10", "3.11", "3.12", "3.13"]
462-
# steps:
463-
# - uses: actions/checkout@v4
464-
# - name: Set up Python 3
465-
# uses: actions/setup-python@v5
466-
# with:
467-
# python-version: ${{ matrix.python }}
468-
# - name: 'Install tox'
469-
# run: |
470-
# pip install tox tox-gh-actions --upgrade
471-
# - name: "Run pytest via tox for ${{ matrix.python }}"
472-
# working-directory: python-avd
473-
# run: |
474-
# tox
451+
# ----------------------------------- #
452+
# Test of pyavd
453+
# ----------------------------------- #
454+
pyavd:
455+
name: Test pyavd
456+
runs-on: ubuntu-latest
457+
needs: [file-changes]
458+
if: |
459+
needs.file-changes.outputs.eos_design == 'true' ||
460+
needs.file-changes.outputs.config_gen == 'true' ||
461+
needs.file-changes.outputs.pyavd == 'true'
462+
strategy:
463+
matrix:
464+
python: ["3.10", "3.11", "3.12", "3.13"]
465+
steps:
466+
- uses: actions/checkout@v4
467+
- name: Set up Python 3
468+
uses: actions/setup-python@v5
469+
with:
470+
python-version: ${{ matrix.python }}
471+
cache: 'pip'
472+
- name: 'Install tox'
473+
run: |
474+
pip install tox tox-gh-actions --upgrade
475+
- name: "Run pytest via tox for ${{ matrix.python }}"
476+
working-directory: python-avd
477+
run: |
478+
tox

0 commit comments

Comments
 (0)