87
87
container-job :
88
88
# Containers must run in Linux based operating systems
89
89
runs-on : ubuntu-latest
90
- # strategy:
91
- # matrix:
92
- # python-version: [3.12] # Python versions
93
- # Docker Hub image that `container-job` executes in
94
- container :
95
- image : ubuntu:latest
96
- options : --cpus 1
97
-
98
90
steps :
99
91
- name : Check out repository code
100
92
uses : actions/checkout@v4
@@ -143,22 +135,22 @@ jobs:
143
135
WORKDIR /avd
144
136
145
137
# Create virtual env
146
- # RUN uv venv --python 3.10 UV3.10 && \
147
- # UV3.10/bin/python -m ensurepip --upgrade
148
- # RUN uv venv --python 3.11 UV3.11 && \
149
- # UV3.11/bin/python -m ensurepip --upgrade
138
+ RUN uv venv --python 3.10 UV3.10 && \
139
+ UV3.10/bin/python -m ensurepip --upgrade
140
+ RUN uv venv --python 3.11 UV3.11 && \
141
+ UV3.11/bin/python -m ensurepip --upgrade
150
142
RUN uv venv --python 3.12 UV3.12 && \
151
143
UV3.12/bin/python -m ensurepip --upgrade
152
- # RUN uv venv --python 3.13 UV3.13 && \
153
- # UV3.13/bin/python -m ensurepip --upgrade
144
+ RUN uv venv --python 3.13 UV3.13 && \
145
+ UV3.13/bin/python -m ensurepip --upgrade
154
146
155
- # # Activate virtual env
156
- # RUN . UV3.10/bin/activate && \
157
- # UV3.10/bin/python -m pip install mock pytest pytest-mock pytest-xdist pyyaml "ansible-core<2.19.0" -r .github/requirements-ci.txt -r ansible_collections/arista/avd/requirements-dev.txt --upgrade
147
+ # Activate virtual env
148
+ RUN . UV3.10/bin/activate && \
149
+ UV3.10/bin/python -m pip install mock pytest pytest-mock pytest-xdist pyyaml "ansible-core<2.19.0" -r .github/requirements-ci.txt -r ansible_collections/arista/avd/requirements-dev.txt --upgrade
158
150
159
- # # Activate virtual env
160
- # RUN . UV3.11/bin/activate && \
161
- # UV3.11/bin/python -m pip install mock pytest pytest-mock pytest-xdist pyyaml "ansible-core<2.19.0" -r .github/requirements-ci.txt -r ansible_collections/arista/avd/requirements-dev.txt --upgrade
151
+ # Activate virtual env
152
+ RUN . UV3.11/bin/activate && \
153
+ UV3.11/bin/python -m pip install mock pytest pytest-mock pytest-xdist pyyaml "ansible-core<2.19.0" -r .github/requirements-ci.txt -r ansible_collections/arista/avd/requirements-dev.txt --upgrade
162
154
163
155
# Activate virtual env
164
156
RUN . UV3.12/bin/activate && \
@@ -168,9 +160,9 @@ jobs:
168
160
# ". UV3.12/bin/activate && UV3.12/bin/python -m pip install mock pytest pytest-mock pytest-xdist pyyaml 'ansible-core<2.19.0' -r .github/requirements-ci.txt -r ansible_collections/arista/avd/requirements-dev.txt --upgrade" \
169
161
# ". UV3.13/bin/activate && UV3.13/bin/python -m pip install mock pytest pytest-mock pytest-xdist pyyaml 'ansible-core<2.19.0' -r .github/requirements-ci.txt -r ansible_collections/arista/avd/requirements-dev.txt --upgrade"
170
162
171
- # # Activate virtual env
172
- # RUN . UV3.13/bin/activate && \
173
- # UV3.13/bin/python -m pip install mock pytest pytest-mock pytest-xdist pyyaml "ansible-core<2.19.0" -r .github/requirements-ci.txt -r ansible_collections/arista/avd/requirements-dev.txt --upgrade
163
+ # Activate virtual env
164
+ RUN . UV3.13/bin/activate && \
165
+ UV3.13/bin/python -m pip install mock pytest pytest-mock pytest-xdist pyyaml "ansible-core<2.19.0" -r .github/requirements-ci.txt -r ansible_collections/arista/avd/requirements-dev.txt --upgrade
174
166
175
167
CMD ["python"]
176
168
EOF
@@ -213,13 +205,6 @@ jobs:
213
205
runs-on : ubuntu-latest
214
206
needs : [ container-job ]
215
207
steps :
216
- # - name: Check out repository code
217
- # uses: actions/checkout@v4
218
- # - name: Set up Docker
219
- # run: |
220
- # sudo apt-get update
221
- # sudo apt-get install -y docker.io
222
-
223
208
- id : string
224
209
uses : vishalmamidi/lowercase-action@v1
225
210
with :
@@ -235,10 +220,6 @@ jobs:
235
220
username : ${{ steps.string.outputs.lowercase }}
236
221
password : ${{ secrets.GITHUB_TOKEN }}
237
222
238
- # - name: Pull docker image from ghcr
239
- # run: |
240
- # docker pull ghcr.io/${{ steps.string.outputs.lowercase }}/avd/python:3.12
241
-
242
223
- name : Run Docker Container
243
224
run : |
244
225
docker run -dit --name avd-python-container ghcr.io/${{ steps.string.outputs.lowercase }}/avd/python_avd:0.0.1 bash
@@ -250,12 +231,12 @@ jobs:
250
231
- name : Execute Ansible integration tests
251
232
run : |
252
233
docker exec avd-python-container bash -c "source UV3.12/bin/activate && cd ansible_collections/arista/avd && ansible-test integration -vv"
253
- # docker exec avd-python-container bash -c "source UV3.13/bin/activate && cd ansible_collections/arista/avd && ansible-test integration -vv"
234
+ docker exec avd-python-container bash -c "source UV3.13/bin/activate && cd ansible_collections/arista/avd && ansible-test integration -vv"
254
235
255
236
- name : Execute Ansible sanity tests
256
237
run : |
257
238
docker exec avd-python-container bash -c "source UV3.12/bin/activate && cd ansible_collections/arista/avd && ansible-test sanity --color yes -v"
258
- # docker exec avd-python-container bash -c "source UV3.13/bin/activate && cd ansible_collections/arista/avd && ansible-test sanity --color yes -v"
239
+ docker exec avd-python-container bash -c "source UV3.13/bin/activate && cd ansible_collections/arista/avd && ansible-test sanity --color yes -v"
259
240
260
241
- name : Stop and Remove Docker Container
261
242
run : |
0 commit comments