Skip to content

Commit a2c7618

Browse files
authored
chore(ci): pass in dedicated connection ID for Ansible tests (#48)
The Ansible end-to-end test for the virtual circuit module has a bug, which causes the test to be skipped only partially when a dedicated Metal connection ID is not specified. Since the PR workflow in this SDK is meant to replicate the coverage provided by the tests in the Ansible collection, this adds the missing dedicated Metal connection ID so that the tests run as expected.
2 parents 8566eb4 + e603a9d commit a2c7618

1 file changed

Lines changed: 12 additions & 6 deletions

File tree

.github/workflows/ansible-tests-pr.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ permissions:
1313
pull-requests: read
1414
contents: read
1515

16+
env:
17+
COLLECTION_PATH: .ansible/collections/ansible_collections/equinix/cloud
18+
1619
jobs:
1720
authorize:
1821
environment:
@@ -47,24 +50,27 @@ jobs:
4750
uses: actions/checkout@v4
4851
with:
4952
repository: equinix-labs/ansible-collection-equinix
50-
path: .ansible/collections/ansible_collections/equinix/cloud
53+
path: ${{ env.COLLECTION_PATH }}
5154
ref: main
5255

5356
- name: install dependencies of ansible collection
5457
run: pip3 install -r requirements-dev.txt -r requirements.txt
55-
working-directory: .ansible/collections/ansible_collections/equinix/cloud
58+
working-directory: ${{ env.COLLECTION_PATH }}
59+
60+
- name: install collection
61+
run: make install
62+
working-directory: ${{ env.COLLECTION_PATH }}
5663

5764
- name: install cloned Python SDK
5865
run: python3 -m pip install .
5966

60-
6167
- name: replace existing keys
6268
run: rm -rf ~/.ansible/test && mkdir -p ~/.ansible/test && ssh-keygen -m PEM -q -t rsa -N '' -f ~/.ansible/test/id_rsa
63-
working-directory: .ansible/collections/ansible_collections/equinix/cloud
69+
working-directory: ${{ env.COLLECTION_PATH }}
6470

6571
- name: run tests in ansible collection directory
6672
run: make testall
67-
working-directory: .ansible/collections/ansible_collections/equinix/cloud
73+
working-directory: ${{ env.COLLECTION_PATH }}
6874
env:
6975
METAL_AUTH_TOKEN: ${{ secrets.METAL_AUTH_TOKEN }}
70-
76+
ANSIBLE_ACC_METAL_DEDICATED_CONNECTION_ID: ${{ secrets.ANSIBLE_ACC_METAL_DEDICATED_CONNECTION_ID }}

0 commit comments

Comments
 (0)