Ctrl K
ComunidadGuías…

scripts/check.sh

Rama main · réplica de lectura del repositorio original.

Archivo original ↗Preguntar a KiBot
#!/usr/bin/env bash
set -euo pipefail

PROJECT_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
cd "$PROJECT_ROOT"

# `npm run check` is commonly launched without activating a virtualenv. Prefer
# the repository environment when present so test collection uses the same
# declared dependency set as CI; an explicitly activated environment wins.
if [[ -z "${VIRTUAL_ENV:-}" && -x "$PROJECT_ROOT/.venv/bin/python" ]]; then
    export PATH="$PROJECT_ROOT/.venv/bin:$PATH"
fi
PYTHON_BIN="${PYTHON_BIN:-python}"

"$PYTHON_BIN" -m compileall -q Aoede/concierge Aoede/downloader-worker
"$PYTHON_BIN" -m pytest \
  --cov=Aoede/concierge \
  --cov=Aoede/downloader-worker \
  --cov-report=term-missing:skip-covered \
  --cov-fail-under=19
"$PYTHON_BIN" -m vulture Aoede/concierge Aoede/downloader-worker \
  --min-confidence 100 \
  --exclude '*/tests/*,*/test_*.py'

if command -v shellcheck >/dev/null 2>&1; then
  shellcheck Aoede/concierge/entrypoint.sh Aoede/downloader-worker/entrypoint.sh Aoede/setup.sh scripts/check.sh
elif [[ "${CI:-}" == "true" || "${CHECK_REQUIRE_SHELLCHECK:-0}" == "1" ]]; then
  echo "shellcheck is required in CI. Install it before running the quality check." >&2
  exit 1
else
  echo "shellcheck is not installed; shell lint skipped locally (CI enforces it)." >&2
fi

npm run lint
npm run format:check
node --experimental-vm-modules scripts/test_party_desktop.mjs
node scripts/test_desktop.mjs
node --experimental-vm-modules scripts/test_client_updates.mjs
node scripts/test_wrapped.mjs
npx eslint Aoede/assets/wrapped_story/story.js
npx prettier --check Aoede/assets/wrapped_story/story.js Aoede/assets/wrapped_story/story.css
node --experimental-vm-modules scripts/test_webapp.mjs
node --experimental-vm-modules scripts/test_collections.mjs
node --experimental-vm-modules scripts/test_appearance.mjs
node scripts/test_ui_icons.mjs
node android/build_icons.mjs --check
node --experimental-vm-modules scripts/test_player_ui.mjs
node --experimental-vm-modules scripts/test_player_end.mjs
node --experimental-vm-modules scripts/test_android.mjs
node android/test_frontend.mjs
node android/test_native_migration.mjs