43 lines
2.2 KiB
Bash
43 lines
2.2 KiB
Bash
#!/usr/bin/env sh
|
|
set -eu
|
|
|
|
(cd backend && python -m compileall -q src tests)
|
|
(cd backend && python -m ruff check src tests)
|
|
(cd backend && python -m mypy src)
|
|
(cd backend && python -m pytest -q)
|
|
(cd node-agent && python -m compileall -q src tests)
|
|
(cd node-agent && python -m ruff check src tests)
|
|
(cd node-agent && python -m mypy src)
|
|
(cd node-agent && python -m pytest -q)
|
|
(cd runtime-worker && python -m compileall -q src tests)
|
|
(cd runtime-worker && python -m ruff check src tests)
|
|
(cd runtime-worker && python -m mypy src)
|
|
(cd runtime-worker && python -m pytest -q)
|
|
(cd frontend && npm test -- --run)
|
|
(cd frontend && npm run build)
|
|
# The console's API origin is compiled into the bundle, so a release image can be wrong while every
|
|
# source-level check is green. Only assert this when a candidate image already exists locally.
|
|
if docker image inspect "modelforge-web:$(cat VERSION)" >/dev/null 2>&1; then
|
|
python scripts/release_image_acceptance.py \
|
|
--image "modelforge-web:$(cat VERSION)" \
|
|
--expect-origin "${MODELFORGE_PUBLIC_API_ORIGIN:-http://localhost:8000}" \
|
|
--version "$(cat VERSION)"
|
|
else
|
|
printf '%s\n' "console release-image acceptance skipped: no modelforge-web:$(cat VERSION) built"
|
|
fi
|
|
docker compose --env-file .env.example config --quiet
|
|
docker compose --env-file .env.example -f docker-compose.yml -f docker-compose.gpu.yml config --quiet
|
|
docker compose --env-file .env.example -f docker-compose.node-agent.yml config --quiet
|
|
docker compose --env-file .env.example -f docker-compose.node-agent.yml \
|
|
-f docker-compose.runtime-worker.yml config --quiet
|
|
MODELFORGE_AGENT_CA_CERT_PATH=./validation-ca.crt \
|
|
MODELFORGE_AGENT_CONTROL_PLANE_HOST_ADDRESS=192.0.2.10 \
|
|
docker compose --env-file .env.example -f docker-compose.node-agent.yml \
|
|
-f docker-compose.node-agent.private-ca.yml config --quiet
|
|
MODELFORGE_AGENT_CA_CERT_PATH=./validation-ca.crt \
|
|
MODELFORGE_AGENT_CONTROL_PLANE_HOST_ADDRESS=192.0.2.10 \
|
|
docker compose --env-file .env.example -f docker-compose.node-agent.yml \
|
|
-f docker-compose.node-agent.private-ca.yml -f docker-compose.runtime-worker.yml \
|
|
-f docker-compose.runtime-worker.private-ca.yml config --quiet
|
|
printf '%s\n' 'M5 checks passed.'
|