mirror of
https://github.com/getredash/redash.git
synced 2026-03-19 19:00:12 -04:00
* Snapshot: 24.07.0-dev * Snapshot: 24.08.0-dev * Snapshot: 24.09.0-dev * Snapshot: 24.10.0-dev * Snapshot: 24.11.0-dev * Snapshot: 24.12.0-dev * Snapshot: 25.01.0-dev * Snapshot: 25.02.0-dev * Snapshot: 25.03.0-dev * Snapshot: 25.04.0-dev * Upgrade Node.js version to 24 in Dockerfile and .nvmrc; update package.json engine constraints * Update major dependencies * Switch from yarn to pnpm * Switch from yarn to pnpm: ci * Update Python version to 3.13 in CI workflow * Refactor Netlify build command to remove pnpm installation step * Update ESLint configuration for improved compatibility and disable specific rules * Restyled by prettier * Add typeRoots and types to tsconfig for improved type definitions * Update Dockerfile.cypress to use Node 24 and streamline installation steps * Fixed tests * Restyled by prettier * Update Jest snapshot comments to point to the official documentation URL * viz-lib: refactor test setup and update snapshots for consistency * Add babel-jest as a dev dependency for improved testing support * Add virtual prop to visualization type selector for improved functionality * Remove CJS/ESM compatibility shim for color-rgba * Restyled by prettier * Enable ESLintPlugin conditionally based on production environment * Import d3 library in d3box.ts * Fix pip install command in CI workflow to use python -m * Replace d3 import with global declaration for compatibility with d3 v3 --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Restyled.io <commits@restyled.io>
76 lines
2.1 KiB
Makefile
76 lines
2.1 KiB
Makefile
.PHONY: compose_build up test_db create_database clean down tests lint backend-unit-tests frontend-unit-tests test build watch start redis-cli bash
|
|
|
|
compose_build: .env
|
|
COMPOSE_DOCKER_CLI_BUILD=1 DOCKER_BUILDKIT=1 docker compose build
|
|
|
|
up:
|
|
docker compose up -d redis postgres --remove-orphans
|
|
docker compose exec -u postgres postgres psql postgres --csv \
|
|
-1tqc "SELECT table_name FROM information_schema.tables WHERE table_name = 'organizations'" 2> /dev/null \
|
|
| grep -q "organizations" || make create_database
|
|
COMPOSE_DOCKER_CLI_BUILD=1 DOCKER_BUILDKIT=1 docker compose up -d --build --remove-orphans
|
|
|
|
test_db:
|
|
@for i in `seq 1 5`; do \
|
|
if (docker compose exec postgres sh -c 'psql -U postgres -c "select 1;"' 2>&1 > /dev/null) then break; \
|
|
else echo "postgres initializing..."; sleep 5; fi \
|
|
done
|
|
docker compose exec postgres sh -c 'psql -U postgres -c "drop database if exists tests;" && psql -U postgres -c "create database tests;"'
|
|
|
|
create_database: .env
|
|
docker compose run server create_db
|
|
|
|
clean:
|
|
docker compose down
|
|
docker compose --project-name cypress down
|
|
docker compose rm --stop --force
|
|
docker compose --project-name cypress rm --stop --force
|
|
docker image rm --force \
|
|
cypress-server:latest cypress-worker:latest cypress-scheduler:latest \
|
|
redash-server:latest redash-worker:latest redash-scheduler:latest
|
|
docker container prune --force
|
|
docker image prune --force
|
|
docker volume prune --force
|
|
|
|
down:
|
|
docker compose down
|
|
|
|
.env:
|
|
printf "REDASH_COOKIE_SECRET=`pwgen -1s 32`\nREDASH_SECRET_KEY=`pwgen -1s 32`\n" >> .env
|
|
|
|
env: .env
|
|
|
|
format:
|
|
pre-commit run --all-files
|
|
|
|
tests:
|
|
docker compose run server tests
|
|
|
|
lint:
|
|
ruff check .
|
|
black --check . --diff
|
|
|
|
backend-unit-tests: up test_db
|
|
docker compose run --rm --name tests server tests
|
|
|
|
frontend-unit-tests:
|
|
CYPRESS_INSTALL_BINARY=0 PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=1 pnpm install --frozen-lockfile
|
|
pnpm test
|
|
|
|
test: backend-unit-tests frontend-unit-tests lint
|
|
|
|
build:
|
|
pnpm run build
|
|
|
|
watch:
|
|
pnpm run watch
|
|
|
|
start:
|
|
pnpm start
|
|
|
|
redis-cli:
|
|
docker compose run --rm redis redis-cli -h redis
|
|
|
|
bash:
|
|
docker compose run --rm server bash
|