diff --git a/.ci/micromamba/init.sh b/.ci/micromamba/init.sh index 50c6d950..2c280ab5 100644 --- a/.ci/micromamba/init.sh +++ b/.ci/micromamba/init.sh @@ -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 +rm -rf $THIS_DIR/micromamba/envs/dev +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 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 17db874a..46a32d7b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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. + +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! diff --git a/run_tests.sh b/run_tests.sh new file mode 100755 index 00000000..2a1170ea --- /dev/null +++ b/run_tests.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash +echo "Initialize micromamba environment..." +source ./.ci/micromamba/init.sh + +echo "Running pylint..." +pylint . +echo "Running bazel test //..." +bazel test //... +echo "Running pytest ..." +pytest test + +echo "Exiting micromamba..." +micromamba deactivate