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

compatible(build_charms_with_cache.yaml): Add pytest-operator plugin to override build_charm #63

Merged
merged 6 commits into from
Jul 28, 2023

Conversation

carlcsaposs-canonical
Copy link
Contributor

Add reusable pytest plugin to override pytest-operator's ops_test.build_charm() to return cached *.charm file instead of building new *.charm file.

Previously, callers of build_charms_with_cache.yaml needed to add a conftest.py to override ops_test.build_charm(). Now, they can just install a plugin (which is versioned along with the workflow).

More details about previous implementation: https://discourse.charmhub.io/t/faster-integration-tests-with-github-caching/8782

@carlcsaposs-canonical
Copy link
Contributor Author

Tested on canonical/mysql-router-k8s-operator#114

@carlcsaposs-canonical
Copy link
Contributor Author

Depends on #58

@carlcsaposs-canonical carlcsaposs-canonical changed the title patch(build_charms_with_cache.yaml): Add pytest-operator plugin to override build_charm compatible(build_charms_with_cache.yaml): Add pytest-operator plugin to override build_charm Jul 26, 2023
Copy link

@taurus-forever taurus-forever left a comment

Choose a reason for hiding this comment

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

Cool!

Copy link

@paulomach paulomach left a comment

Choose a reason for hiding this comment

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

looks great

@carlcsaposs-canonical carlcsaposs-canonical merged commit d0e21c6 into main Jul 28, 2023
1 check passed
@carlcsaposs-canonical carlcsaposs-canonical deleted the pytest-plugin-cache branch July 28, 2023 11:25
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