Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fixes in integration test GH action #72

Merged
merged 1 commit into from
Jan 17, 2024

Conversation

t0mk
Copy link
Contributor

@t0mk t0mk commented Jan 11, 2024

This PR fixes GH action for integration tests.

The workflow should clone the ansible collection repo and install it. Right now it fails on pip install requirements because it's cloning this repo instead.

@t0mk
Copy link
Contributor Author

t0mk commented Jan 11, 2024

The integratoin tests fail with
ERROR: Could not open requirements file: [Errno 2] No such file or directory: 'requirements-dev.txt'

.. that's what this PR should fix. It worked in my fork (which is the only way to test GH actions).

@@ -31,7 +31,7 @@ jobs:
run:
working-directory: .ansible/collections/ansible_collections/equinix/cloud
steps:
- name: checkout Ansible collection
- repository: checkout Ansible collection
Copy link
Member

@displague displague Jan 11, 2024

Choose a reason for hiding this comment

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

This doesn't appear to be a valid parameter for a step, nor a valid repository value:

https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-using-an-action-inside-a-different-private-repository-than-the-workflow

Based on the value, I would think you may have meant to replace name with run_name, but not clear that that would fix anything

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@displague thanks for pointing it out. I wanted to change the name param or the checkout action. name there is invalid param, it should be repository.

@ctreatma
Copy link
Contributor

ctreatma commented Jan 11, 2024

which is the only way to test GH actions

Since the head branch for this PR is part of this repository and not from a fork, and since the workflow exists in the main branch on this repo, you can run the updated job manually by clicking the Run workflow button on the workflow page and selecting this branch from the dropdown menu.

An example run of the updated workflow is here: https://github.com/equinix-labs/metal-python/actions/runs/7491105603/workflow

@t0mk t0mk force-pushed the fix_arg_name_in_integration_tests_workflow branch from 67f3850 to 895e7e6 Compare January 15, 2024 12:18
@t0mk t0mk force-pushed the fix_arg_name_in_integration_tests_workflow branch from 895e7e6 to 5af0c85 Compare January 15, 2024 12:30
@t0mk t0mk changed the title fix: wrong argument for repository name in integration test workflow fix: fix checkout call in integration test GH action Jan 15, 2024
@t0mk t0mk changed the title fix: fix checkout call in integration test GH action fix: fixes in integration test GH action Jan 15, 2024
@t0mk t0mk force-pushed the fix_arg_name_in_integration_tests_workflow branch from 5af0c85 to 1174feb Compare January 15, 2024 12:35
@t0mk
Copy link
Contributor Author

t0mk commented Jan 15, 2024

which is the only way to test GH actions

Since the head branch for this PR is part of this repository and not from a fork, and since the workflow exists in the main branch on this repo, you can run the updated job manually by clicking the Run workflow button on the workflow page and selecting this branch from the dropdown menu.

An example run of the updated workflow is here: https://github.com/equinix-labs/metal-python/actions/runs/7491105603/workflow

Thank you, I wasn't aware it's possible to specify ref for the action.

@t0mk
Copy link
Contributor Author

t0mk commented Jan 16, 2024

@ctreatma @displague I finally have a successful run of the integration tests PR at:
https://github.com/equinix-labs/metal-python/actions/runs/7531796948

It runs tests from Ansible collection main (not any release), on with Python SDK from a tested PR.

This is ready for review.

@ctreatma ctreatma merged commit 3dc9260 into main Jan 17, 2024
4 of 5 checks passed
@ctreatma ctreatma deleted the fix_arg_name_in_integration_tests_workflow branch January 17, 2024 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants