From 08231a30cbad8734746f91243f561b7c50942c0e Mon Sep 17 00:00:00 2001 From: Diego Lovison Date: Wed, 13 Nov 2024 14:34:52 -0300 Subject: [PATCH] How run the test suite locally --- .github/scripts/tests/README.md | 64 +++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 .github/scripts/tests/README.md diff --git a/.github/scripts/tests/README.md b/.github/scripts/tests/README.md new file mode 100644 index 000000000..acb76eaa4 --- /dev/null +++ b/.github/scripts/tests/README.md @@ -0,0 +1,64 @@ +# Setup the local environment + +All the following commands must be executed in a single terminal instance. + +## Increase inotify Limits +To prevent file monitoring issues in development environments (e.g., IDEs or file sync tools), increase inotify limits: +```bash +sudo sysctl fs.inotify.max_user_instances=2280 +sudo sysctl fs.inotify.max_user_watches=1255360 +``` +## Create kind cluster +```bash +cat < /tmp/kubeflow-config +export KUBECONFIG=/tmp/kubeflow-config +``` +# docker +In order to by pass the docker limit issue while downloading the images. Let's use your credentials +```bash +docker login +``` + +Upload the secret. The following command will return an error. You need to replace `to` with user `username` +```bash +kubectl create secret generic regcred \ +--from-file=.dockerconfigjson=/home/to/.docker/config.json \ +--type=kubernetes.io/dockerconfigjson +``` + +# Test environment variables +Replace the `/path/to` in order to match the `data-science-pipelines-operator` folder +```bash +export GIT_WORKSPACE=/path/to/data-science-pipelines-operator +``` +The image registry is required because you are running the test locally. +It will build and upload the image to your repository. + +Replace `username` with your quay user +```bash +export REGISTRY_ADDRESS=quay.io/username +``` + +# Run the test +```bash +sh .github/scripts/tests/tests.sh --kind +```