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

Add running examples to cargo test #65

Merged
merged 5 commits into from
Feb 18, 2024
Merged

Add running examples to cargo test #65

merged 5 commits into from
Feb 18, 2024

Conversation

MrHedmad
Copy link
Owner

@MrHedmad MrHedmad commented Feb 18, 2024

The kerblam-examples repo has execution examples for kerblam!. Since kerblam is an execution-centric tool, not using these examples as tests felt like a wasted opportunity.

This commit adds infrastructure to run these tests with cargo test by cloning the 'kerblam-examples' repository, navigating to the example directory, and executing the bash script run in each test directory.

The test expects that the run script dies whenever there is an error, and that it does the checks that we want to do during the test. It also expects that the files that were in the original example do not change, as kerblam! should not touch pipes, dockerfiles, etc...

TODO

Before merging, tick all of these boxes:

  • cargo test passes without errors or warnings.
  • Documentation is updated that reflect these changes.
    • This PR changes nothing that is reflected in docs.
  • @all-contributors is made aware of this PR.

The `kerblam-examples` repo has execution examples for kerblam!.
Since kerblam is an execution-centric tool, not using these examples as
tests feeled like a wasted opportunity.

This commit adds infrastructure to run these tests with `cargo test` by
cloning the 'kerblam-examples' repository, navigating to the example
directory, and executing the bash script `run` in each test directory.

The test expects that the `run` script dies whenever there is an error,
and that it does the checks that we want to do during the test.
It also expects that the files that were in the original example do not
change, as kerblam! should not touch pipes, dockerfiles, etc...
@MrHedmad MrHedmad changed the title feat: add the --yes flag to 'data clean' Add running examples to cargo test Feb 18, 2024
@MrHedmad MrHedmad marked this pull request as ready for review February 18, 2024 18:41
@MrHedmad MrHedmad merged commit f08514f into main Feb 18, 2024
5 checks passed
@MrHedmad MrHedmad deleted the example_tests branch February 18, 2024 18:42
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.

1 participant