Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .ci/micromamba/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,13 @@ if [[ "$VERBOSE" -ge 2 ]]; then
micromamba info
fi

# Clean up previous environment
info "Cleaning up previous environment [$ENV_NAME]..."
chmod -R +w $THIS_DIR/micromamba/envs/dev
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think dev is actually $ENV_NAME

rm -rf $THIS_DIR/micromamba/envs/dev
Comment on lines +74 to +75
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Hm... Are you sure this is safe? There reason might be running session. Maybe proper deactivation may help?

micromamba deactivate
# Create environment
info "Creating environment [$ENV_NAME]..."
micromamba deactivate
micromamba create --file $THIS_DIR/$ENV_NAME.yaml --name $ENV_NAME --yes $MAMBA_VERBOSITY
# micromamba config set env_prompt "[{name}] "
micromamba activate $ENV_NAME
Expand Down
13 changes: 12 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,15 @@ 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 are passed.
Comment thread
nettle marked this conversation as resolved.

You must run the following tests locally:
* `pylint .`
* `bazel test //...`
* `pytest test`


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!
13 changes: 13 additions & 0 deletions run_tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env bash
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

What I think is that run_tests.sh is actually micromamba dependent, so maybe we should keep it as .ci/micromamba/run_tests.sh ?

echo "Initialize micromamba environment..."
source ./.ci/micromamba/init.sh
Comment thread
nettle marked this conversation as resolved.

echo "Running pylint..."
pylint .
echo "Running bazel test //..."
bazel test //...
echo "Running pytest ..."
pytest test

echo "Exiting micromamba..."
micromamba deactivate
Loading