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

TEST: add VCR recording workflow #360

Merged
merged 3 commits into from
Mar 26, 2024
Merged

TEST: add VCR recording workflow #360

merged 3 commits into from
Mar 26, 2024

Conversation

igor-davidyuk
Copy link
Contributor

@igor-davidyuk igor-davidyuk commented Mar 25, 2024

This PR introduces a manual GItHub action workflow that rebuilds VCR cassettes and pushes it back to the branch

Signed-off-by: Igor Davidyuk <igor.davidyuk@intel.com>
Signed-off-by: Igor Davidyuk <igor.davidyuk@intel.com>
@igor-davidyuk igor-davidyuk requested a review from ljcornel March 25, 2024 14:48
Copy link
Collaborator

@ljcornel ljcornel left a comment

Choose a reason for hiding this comment

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

Thanks! Looks good overall, just some minor comments.


permissions:
contents: read
pull-requests: write # 'write' access to pull requests
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think you will need contents: write permission in order to push changes. pull-requests: write may not be needed I believe

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I imagine it works like this:
You create a PR with communication-breaking changes and have the tests fail. Then you run this workflow and it updates the cassettes right in your PR. This is why I have this permission in place

Copy link
Collaborator

Choose a reason for hiding this comment

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

I see where you're coming from but I'm actually not 100% sure about the exact scope of the permissions. I thought that for pushing to any branch you'd need to have contents: write permissions, but if the PR is made from a fork of the repo then you're probably right and you'd need to be able to write to pull-requests as well.

Let's keep it as is and see if it works, we can always update them later.

.github/workflows/record-vcr-cassettes.yaml Outdated Show resolved Hide resolved
.github/workflows/record-vcr-cassettes.yaml Outdated Show resolved Hide resolved
Signed-off-by: Igor Davidyuk <igor.davidyuk@intel.com>
@igor-davidyuk igor-davidyuk merged commit af41d46 into main Mar 26, 2024
9 checks passed
@igor-davidyuk igor-davidyuk deleted the vcr-git-action branch March 26, 2024 10:24
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.

2 participants