Skip to content

Commit ebd0fa1

Browse files
committed
python_requirements
1 parent 0689678 commit ebd0fa1

File tree

1 file changed

+26
-49
lines changed

1 file changed

+26
-49
lines changed

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

+26-49
Original file line numberDiff line numberDiff line change
@@ -89,55 +89,32 @@ jobs:
8989
# ----------------------------------- #
9090
# Test Requirements
9191
# ----------------------------------- #
92-
# python_requirements:
93-
# name: Test Python requirements installation
94-
# runs-on: ubuntu-latest
95-
# outputs:
96-
# cache-key: ${{ steps.cache.outputs.cache-key }}
97-
# needs: [file-changes]
98-
# if: needs.file-changes.outputs.requirements == 'true'
99-
# strategy:
100-
# fail-fast: true
101-
# matrix:
102-
# python_version:
103-
# - "3.10"
104-
# - "3.11"
105-
# - "3.12"
106-
# - "3.13"
107-
# steps:
108-
# - uses: actions/checkout@v4
109-
110-
# # Cache pip dependencies for .github/requirements-ci.txt
111-
# - name: Cache pip dependencies for requirements-ci.txt
112-
# id: cache-ci
113-
# uses: actions/cache@v3
114-
# with:
115-
# path: ~/.cache/pip
116-
# key: ${{ runner.os }}-pip-${{ matrix.python_version }}-${{ hashFiles('.github/requirements-ci.txt') }}
117-
# restore-keys: |
118-
# ${{ runner.os }}-pip-${{ matrix.python_version }}-
119-
120-
# # Cache pip dependencies for ansible_collections/arista/avd/requirements-dev.txt
121-
# - name: Cache pip dependencies for requirements-dev.txt
122-
# id: cache-dev
123-
# uses: actions/cache@v3
124-
# with:
125-
# path: ~/.cache/pip
126-
# key: ${{ runner.os }}-pip-${{ matrix.python_version }}-${{ hashFiles('ansible_collections/arista/avd/requirements-dev.txt') }}
127-
# restore-keys: |
128-
# ${{ runner.os }}-pip-${{ matrix.python_version }}-
129-
130-
# # Set up Python for each version in the matrix
131-
# - name: Set up Python ${{ matrix.python_version }}
132-
# uses: actions/setup-python@v5
133-
# with:
134-
# python-version: ${{ matrix.python_version }}
135-
136-
# # Install Python dependencies
137-
# - name: Install Python requirements
138-
# if: steps.cache-ci.outputs.cache-hit != 'true' || steps.cache-dev.outputs.cache-hit != 'true'
139-
# run: |
140-
# pip install -r .github/requirements-ci.txt -r ansible_collections/arista/avd/requirements-dev.txt --upgrade
92+
python_requirements:
93+
name: Test Python requirements installation
94+
runs-on: ubuntu-latest
95+
outputs:
96+
cache-key: ${{ steps.cache.outputs.cache-key }}
97+
needs: [file-changes]
98+
if: needs.file-changes.outputs.requirements == 'true'
99+
strategy:
100+
fail-fast: true
101+
matrix:
102+
python_version:
103+
- "3.10"
104+
- "3.11"
105+
- "3.12"
106+
- "3.13"
107+
steps:
108+
- uses: actions/checkout@v4
109+
- name: Set up Python ${{ matrix.python_version }}
110+
uses: actions/setup-python@v5
111+
with:
112+
python-version: ${{ matrix.python_version }}
113+
cache: 'pip'
114+
- name: Install Python requirements
115+
if: steps.cache-ci.outputs.cache-hit != 'true' || steps.cache-dev.outputs.cache-hit != 'true'
116+
run: |
117+
pip install -r .github/requirements-ci.txt -r ansible_collections/arista/avd/requirements-dev.txt --upgrade
141118
142119
# # ----------------------------------- #
143120
# # EOS CLI CONFIG GEN MOLECULE

0 commit comments

Comments
 (0)