Skip to content
This repository has been archived by the owner on Dec 23, 2024. It is now read-only.

ci: Add GH action for running integration tests via ansible-collection-equinix #61

Merged
merged 2 commits into from
Dec 20, 2023

Conversation

t0mk
Copy link
Contributor

@t0mk t0mk commented Dec 5, 2023

This PR adds a GH action that will test metal-python PRs with integration tests from ansible-collectoin-equinix.

We clone the Ansible collection and then install metal-python version fetched from the PR. Then we run integration tests from Ansible collection.

This way we don't have to do an extra test suite for the generated Python SDK and we have some certainty that the relevant pieces of the generated code work.

It would be good to set User Agent for the Ansible calls. Right now it's not possible to do it over environment variables. We might need to implement settting UA over envvar in the Ansible collection.

For this to work, we also need METAL_API_TOKEN in secrets of this repo. Basically, the secrets and environments should be set just like in https://github.com/equinix-labs/ansible-collection-equinix.

@ctreatma what do you think?

@t0mk t0mk requested a review from ctreatma December 5, 2023 14:52
@t0mk t0mk changed the title Add GH action for running integration tests via ansible-collection-equinix fix: Add GH action for running integration tests via ansible-collection-equinix Dec 5, 2023
@t0mk t0mk changed the title fix: Add GH action for running integration tests via ansible-collection-equinix ci: Add GH action for running integration tests via ansible-collection-equinix Dec 5, 2023
Copy link
Contributor

@ctreatma ctreatma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me at a glance. I'll run it post-merge and we can adjust if needed.

@ctreatma ctreatma merged commit 46becc1 into main Dec 20, 2023
3 checks passed
@ctreatma ctreatma deleted the integration_test_with_ansible branch December 20, 2023 20:36
@ctreatma
Copy link
Contributor

Manual trigger of the merged workflow failed: https://github.com/equinix-labs/metal-python/actions/runs/7280529360/job/19839134379#step:6:16

Now that the workflow is defined in main, you can run branch versions of the workflow without opening a PR in order to validate the workflow changes (workflow changes won't take effect for the PR itself because it's using the pull_request_target trigger, which uses the workflow file from the target branch).

@t0mk t0mk mentioned this pull request Dec 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants