-
Notifications
You must be signed in to change notification settings - Fork 410
How to build and contribute
If you wish to build from source or contribute follow the steps below.
Make sure you have installed the following packages:
The cloned repository has the following directory structure:
-
redisinsight/ui- Contains the frontend code -
redisinsight/api- Contains the backend code -
docs- Contains the documentation -
scripts- Build scripts and other build-related files -
configs- Webpack configuration files and other build-related files -
tests- Contains e2e tests
Before development or building, install the following required dependencies
yarn install && yarn --cwd redisinsight/api/Run yarn build:statics or yarn build:statics:win for Windows
After you have installed all dependencies you can package the app.
Run yarn package:prod to package app for the local platform:
yarn package:prodThe packaged installer will become available in the folder ./release.
Run yarn --cwd redisinsight/api/ start:dev to start a local API at localhost:5540.
yarn --cwd redisinsight/api/ start:devWhile the API is running, open your browser and navigate to http://localhost:5540/api/docs. You should see the Swagger UI.
Run yarn dev:ui to start a local server for UI.
yarn dev:uiWeb interface will be available at http://localhost:8080.
Now servers will watch for changes and automatically build for you.
yarn testyarn --cwd redisinsight/api testyarn --cwd redisinsight/api test:covyarn --cwd redisinsight/api test:apiyarn --cwd redisinsight/api test:api:covNOTE: Using
yarn test:api*scripts you should have redis server up and running.
By default tests will look onlocalhost:6379without any auth.
To customize tests configs, you should run test with proper environment variables.
Example:
If you have redis server running on a different host or port somehost:7777 with default user pass somepass
You should run test commands with such environment variables
TEST_REDIS_HOST=somehost \
TEST_REDIS_PORT=7777 \
TEST_REDIS_PASSWORD=somepass \
yarn --cwd redisinsight/api test:apiYou can find all possible environment variable available in the constants.ts file
Please check this documentation as well.
Here you should not care about tests and local redis database configuration
We will spin up server inside docker container and run tests over it
./redisinsight/api/test/test-runs/start-test-run.sh -r oss-st-6- -r - is the Redis Test Environment name
We are supporting several test environments to run tests on various Redis databases:
- oss-st-5 - OSS Standalone v5
- oss-st-5-pass - OSS Standalone v5 with admin pass required
- oss-st-6 - OSS Standalone v6 and all modules
- oss-st-6-tls - OSS Standalone v6 with TLS enabled
- oss-st-6-tls-auth - OSS Standalone v6 with TLS auth required
- oss-clu - OSS Cluster
- oss-clu-tls - OSS Cluster with TLS enabled
- oss-sent - OSS Sentinel
- re-st - Redis Enterprise with Standalone inside
- re-clu - Redis Enterprise with Cluster inside
Install E2E tests deps
yarn --cwd tests/e2e Run E2E tests
yarn --cwd tests/e2e test:chrome