@@ -183,61 +183,79 @@ jobs:
183
183
run : |
184
184
docker push ghcr.io/${{ steps.string.outputs.lowercase }}/avd/python:0.0.1
185
185
186
- reuse-ghcr-image :
187
- name : reuse first job
186
+ reuse_container_image :
187
+ name : Reuse image with ghcr credentials
188
188
runs-on : ubuntu-latest
189
- needs : [ container-job ]
189
+ needs : [container-job]
190
+ container :
191
+ image : ghcr.io/shivani-gslab/avd/python:0.0.1
192
+ credentials :
193
+ username : ${{ github.actor }}
194
+ password : ${{ secrets.GITHUB_TOKEN }}
190
195
steps :
191
196
- name : Check out repository code
192
197
uses : actions/checkout@v4
193
- # - name: Set up Docker
194
- # run: |
195
- # sudo apt-get update
196
- # sudo apt-get install -y docker.io
198
+ - name : run tests
199
+ run : |
200
+ source UV3.12/bin/activate
201
+ cd ansible_collections/arista/avd
202
+ ansible-test units -vv
203
+
204
+ # reuse-ghcr-image:
205
+ # name: reuse first job
206
+ # runs-on: ubuntu-latest
207
+ # needs: [ container-job ]
208
+ # steps:
209
+ # - name: Check out repository code
210
+ # uses: actions/checkout@v4
211
+ # # - name: Set up Docker
212
+ # # run: |
213
+ # # sudo apt-get update
214
+ # # sudo apt-get install -y docker.io
197
215
198
- - id : string
199
- uses : vishalmamidi/lowercase-action@v1
200
- with :
201
- string : ${{ github.repository_owner }}
216
+ # - id: string
217
+ # uses: vishalmamidi/lowercase-action@v1
218
+ # with:
219
+ # string: ${{ github.repository_owner }}
202
220
203
- - name : log lowercase repo name
204
- run : echo ${{ steps.string.outputs.lowercase }}
221
+ # - name: log lowercase repo name
222
+ # run: echo ${{ steps.string.outputs.lowercase }}
205
223
206
- - name : Log in to GitHub Container Registry
207
- uses : docker/login-action@v2
208
- with :
209
- registry : ghcr.io
210
- username : ${{ steps.string.outputs.lowercase }}
211
- password : ${{ secrets.GITHUB_TOKEN }}
224
+ # - name: Log in to GitHub Container Registry
225
+ # uses: docker/login-action@v2
226
+ # with:
227
+ # registry: ghcr.io
228
+ # username: ${{ steps.string.outputs.lowercase }}
229
+ # password: ${{ secrets.GITHUB_TOKEN }}
212
230
213
- # - name: Pull docker image from ghcr
214
- # run: |
215
- # docker pull ghcr.io/${{ steps.string.outputs.lowercase }}/avd/python:3.12
231
+ # # - name: Pull docker image from ghcr
232
+ # # run: |
233
+ # # docker pull ghcr.io/${{ steps.string.outputs.lowercase }}/avd/python:3.12
216
234
217
- - name : Run Docker Container
218
- run : |
219
- docker run -dit --name avd-python-container ghcr.io/${{ steps.string.outputs.lowercase }}/avd/python:0.0.1 bash
235
+ # - name: Run Docker Container
236
+ # run: |
237
+ # docker run -dit --name avd-python-container ghcr.io/${{ steps.string.outputs.lowercase }}/avd/python:0.0.1 bash
220
238
221
- - name : Execute Ansible unit tests
222
- run : |
223
- docker exec avd-python-container bash -c "source UV3.12/bin/activate && cd ansible_collections/arista/avd && ansible-test units -vv"
239
+ # - name: Execute Ansible unit tests
240
+ # run: |
241
+ # docker exec avd-python-container bash -c "source UV3.12/bin/activate && cd ansible_collections/arista/avd && ansible-test units -vv"
224
242
225
- - name : Execute Ansible integration tests
226
- run : |
227
- docker exec avd-python-container bash -c "source UV3.12/bin/activate && cd ansible_collections/arista/avd && ansible-test integration -vv"
228
- docker exec avd-python-container bash -c "source UV3.13/bin/activate && cd ansible_collections/arista/avd && ansible-test integration -vv"
243
+ # - name: Execute Ansible integration tests
244
+ # run: |
245
+ # docker exec avd-python-container bash -c "source UV3.12/bin/activate && cd ansible_collections/arista/avd && ansible-test integration -vv"
246
+ # docker exec avd-python-container bash -c "source UV3.13/bin/activate && cd ansible_collections/arista/avd && ansible-test integration -vv"
229
247
230
- - name : Execute Ansible sanity tests
231
- run : |
232
- docker exec avd-python-container bash -c "source UV3.12/bin/activate && cd ansible_collections/arista/avd && ansible-test sanity --color yes -v"
233
- docker exec avd-python-container bash -c "source UV3.13/bin/activate && cd ansible_collections/arista/avd && ansible-test sanity --color yes -v"
248
+ # - name: Execute Ansible sanity tests
249
+ # run: |
250
+ # docker exec avd-python-container bash -c "source UV3.12/bin/activate && cd ansible_collections/arista/avd && ansible-test sanity --color yes -v"
251
+ # docker exec avd-python-container bash -c "source UV3.13/bin/activate && cd ansible_collections/arista/avd && ansible-test sanity --color yes -v"
234
252
235
- # - name: Execute Ansible lint tests
236
- # run: |
237
- # docker exec avd-python-container bash -c "cd ansible_collections/arista/avd && ansible-test integration -vv"
253
+ # # - name: Execute Ansible lint tests
254
+ # # run: |
255
+ # # docker exec avd-python-container bash -c "cd ansible_collections/arista/avd && ansible-test integration -vv"
238
256
239
- - name : Stop and Remove Docker Container
240
- run : |
241
- docker stop avd-python-container
242
- docker rm avd-python-container
257
+ # - name: Stop and Remove Docker Container
258
+ # run: |
259
+ # docker stop avd-python-container
260
+ # docker rm avd-python-container
243
261
0 commit comments