-
Notifications
You must be signed in to change notification settings - Fork 4
Define how to run tests #218
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
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
ced5613
Define how to run tests
furtib 3ec6fd8
Define micromamba as defacto environment manager
furtib 117adbf
Make micromamba more robust
furtib 6782206
Move cleanup to micromamba init.sh
furtib 18312f1
Fix micromamba environment errors
furtib 7cb5f47
Move test script to .ci/micromamba
furtib 00facb1
Add micromamba into CONTRIBUTING.md
furtib 62eb8b9
Update .ci/micromamba/init.sh
furtib File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| #!/usr/bin/env bash | ||
|
Szelethus marked this conversation as resolved.
|
||
| SCRIPT_DIR=$(dirname "$(realpath "$0")") | ||
| cd $SCRIPT_DIR | ||
|
|
||
| echo "Initialize micromamba environment..." | ||
| source ./init.sh | ||
|
|
||
| # Change directory to project root | ||
| cd ../../ | ||
|
|
||
| echo "Running pylint..." | ||
| pylint . | ||
| echo "Running bazel test //..." | ||
| bazel test //... | ||
| echo "Running pytest ..." | ||
| pytest test | ||
|
|
||
| echo "Exiting micromamba..." | ||
| micromamba deactivate | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -49,4 +49,18 @@ test/test.sh | Functional and unit test runner | |
| Submitting a patch and testing | ||
| ------- | ||
|
|
||
| Before submitting any changes please make sure all tests and checks are passed, pylint doesn't show warnings on new code, and fill out the Pull Request template. If you are a new contributor, and the template is confusing, feel free to submit the PR and we will help you iron it out! On how to run or add a new test, please see [test/README.md](test/README.md). | ||
| Before submitting any changes please make sure all tests and checks have passed inside the micromamba environment. | ||
|
|
||
| To enable the Micromamba testing environment run `source .ci/micromamba/init.sh`. | ||
| For more information see `.ci/micromamba/README.md`. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Btw, we forgot to mention |
||
| You must run the following tests locally: | ||
| * `pylint .` | ||
| * `bazel test //...` | ||
| * `pytest test` | ||
|
|
||
| To run all these test inside the micromamba environment automatically, run `.ci/micromamba/run_tests.sh`. | ||
|
|
||
| On how to run or add a new test, please see [test/README.md](test/README.md). | ||
|
|
||
|
|
||
| Finally, fill out the Pull Request template. If you are a new contributor, and the template is confusing, feel free to submit the PR and we will help you iron it out! | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the folder didn't already exist, I get errors:
This is likely just cosmetic, but inelegant.